:root {
    --bg: #f5f3ee;
    --bg-soft: #fbfaf7;
    --card: rgba(255, 255, 255, 0.88);
    --card-strong: #ffffff;
    --text: #1f2933;
    --muted: #6f6a63;
    --border: rgba(84, 71, 55, 0.12);
    --shadow: 0 10px 35px rgba(32, 24, 18, 0.08);

    --brand-green: #88af43;
    --brand-green-dark: #6f9334;
    --brand-brown: #8a6b46;
    --brand-brown-dark: #6f5538;

    --ok-bg: #eef7df;
    --ok-text: #557126;
    --warn-bg: #fff3d9;
    --warn-text: #8b6500;
    --danger-bg: #fff1f1;
    --danger-text: #8a1f1f;
    --danger-border: #e2b4b4;

    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --container: 1320px;
    --header-height: 96px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(136,175,67,0.12), transparent 28%),
        radial-gradient(circle at left 20%, rgba(138,107,70,0.10), transparent 24%),
        linear-gradient(180deg, #f8f6f1 0%, #f2efe8 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.page {
    min-height: 100vh;
}

.main-content {
    padding-top: calc(var(--header-height) + 26px);
    padding-bottom: 40px;
}

.wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.card {
    background: var(--card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
    padding: 24px;
}

.card + .card {
    margin-top: 20px;
}

h1, h2, h3 {
    color: var(--text);
    letter-spacing: -0.02em;
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.08;
}

h2 {
    margin: 0 0 14px;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.12;
}

h3 {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.15;
}

p {
    margin: 0 0 12px;
    line-height: 1.6;
}

.muted {
    color: var(--muted);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(136,175,67,0.12);
    color: var(--brand-green-dark);
    font-size: 13px;
    font-weight: bold;
    letter-spacing: .02em;
}

.btn,
.btn-secondary,
.btn-link-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: .18s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn {
    background: var(--brand-green);
    color: #fff;
}

.btn:hover {
    background: var(--brand-green-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #fff;
    color: var(--brand-brown-dark);
    border-color: rgba(138,107,70,0.18);
}

.btn-secondary:hover {
    background: #f9f6f1;
    transform: translateY(-1px);
}

.btn-link-soft {
    background: rgba(255,255,255,0.7);
    color: var(--text);
    border-color: rgba(84, 71, 55, 0.10);
}

.btn-link-soft:hover {
    background: #fff;
    transform: translateY(-1px);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.status-ok {
    background: var(--ok-bg);
    color: var(--ok-text);
}

.status-warn {
    background: var(--warn-bg);
    color: var(--warn-text);
}

.error-box {
    padding: 14px 16px;
    border: 1px solid var(--danger-border);
    background: var(--danger-bg);
    color: var(--danger-text);
    border-radius: 12px;
}

.empty-box {
    padding: 14px 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.65);
    color: var(--muted);
    border-radius: 12px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

input[type="date"],
input[type="text"],
input[type="password"],
select {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(84, 71, 55, 0.16);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    outline: none;
}

input[type="date"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: rgba(136,175,67,0.65);
    box-shadow: 0 0 0 4px rgba(136,175,67,0.12);
}

.table-wrap {
    overflow-x: auto;
    border-radius: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,0.72);
    border-radius: 16px;
    overflow: hidden;
}

thead th {
    background: #f1ede7;
    text-align: center;
    font-size: 13px;
    letter-spacing: .03em;
    color: var(--brand-brown-dark);
}

th, td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(84,71,55,0.10);
    vertical-align: top;
}

tbody tr:hover {
    background: rgba(136,175,67,0.05);
}

.num {
    text-align: right;
    white-space: nowrap;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    padding: 14px 22px;
    background: rgba(248, 246, 241, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(84, 71, 55, 0.10);
}

.site-header__inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.site-brand img {
    display: block;
    height: 62px;
    width: auto;
}

.site-brand__text {
    min-width: 0;
}

.site-brand__title {
    margin: 0;
    font-size: 15px;
    font-weight: bold;
    color: var(--brand-green-dark);
    line-height: 1.1;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.site-brand__subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--brand-brown);
    line-height: 1.2;
}

.site-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-user__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(84,71,55,0.10);
    color: #3d372f;
    font-size: 14px;
}

.site-user__logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--brand-green);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: .16s ease;
}

.site-user__logout:hover {
    background: var(--brand-green-dark);
}

@media (max-width: 1080px) {
    :root {
        --header-height: 92px;
    }
}

@media (max-width: 720px) {
    :root {
        --header-height: 84px;
    }

    .wrap {
        padding: 0 14px;
    }

    .main-content {
        padding-top: calc(var(--header-height) + 18px);
        padding-bottom: 24px;
    }

    .card {
        padding: 18px;
        border-radius: 20px;
    }

    .site-header {
        padding: 10px 12px;
    }

    .site-header__inner {
        align-items: flex-start;
        gap: 12px;
    }

    .site-brand img {
        height: 46px;
    }

    .site-brand__title {
        font-size: 13px;
    }

    .site-brand__subtitle {
        font-size: 11px;
    }

    .site-user {
        gap: 8px;
    }

    .site-user__pill,
    .site-user__logout {
        min-height: 34px;
        padding: 0 10px;
        font-size: 12px;
    }

    th, td {
        padding: 10px 8px;
    }
}