.site-header {
    position: relative;
    z-index: 100;
    width: 100%;
}

.admin-body {
    background: #f1ede4;
    min-height: 100vh;
}


.admin-subheader{position:relative;z-index:90;width:100%;background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line);box-shadow:0 4px 14px rgba(0,0,0,.05)}
.admin-subheader-inner{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;min-width:0;padding-top:8px;padding-bottom:8px}
.admin-subheader a{display:inline-flex;align-items:center;min-height:38px;padding:9px 13px;border-radius:7px;color:inherit;text-decoration:none;line-height:1.3;white-space:nowrap;transition:background .2s ease,color .2s ease}
.admin-subheader a:hover,.admin-subheader a:focus-visible{background:#f5f1e8}
.admin-subheader .admin-logout{color:#b42318}
.admin-subheader .admin-logout:hover,.admin-subheader .admin-logout:focus-visible{background:#fff0ee}
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

.admin-nav a {
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    word-break: normal;
    overflow-wrap: anywhere;
}

.admin-table th {
    color: var(--gold);
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.dashboard .card {
    min-height: 175px;
    min-width: 0;
}

.dashboard h2 {
    margin-bottom: 0;
    font-size: 3rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.search-panel {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin: 0 0 22px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.04);
}

.search-field {
    flex: 1;
    min-width: 0;
}

.search-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.search-panel input[type="search"] {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
}

.search-panel .btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.table-card {
    width: 100%;
    min-width: 0;
}

.site-header *,
.admin-body *,
.admin-table *,
.search-panel *,
.dashboard *,
.admin-form-grid * {
    box-sizing: border-box;
}

.site-header img {
    max-width: 100%;
    height: auto;
}

.site-header,
.site-header .nav,
.site-header .container,
.admin-body,
.admin-body .container {
    min-width: 0;
}

.site-header h1,
.site-header h2,
.site-header h3,
.site-header p,
.site-header a,
.admin-body h1,
.admin-body h2,
.admin-body h3,
.admin-body p,
.admin-body a,
.admin-body span,
.admin-body label,
.admin-body td,
.admin-body th {
    overflow-wrap: anywhere;
}

.site-header a,
.admin-nav a {
    line-height: 1.4;
}


@media (max-width:1100px){.dashboard{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-subheader-inner{gap:6px}.admin-subheader a{padding:9px 11px}}
@media (max-width:900px){.admin-form-grid{grid-template-columns:1fr}.search-panel{align-items:stretch;flex-wrap:wrap}.search-field{flex-basis:100%}.admin-subheader-inner{justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:thin;padding-top:7px;padding-bottom:7px}.admin-subheader a{flex:0 0 auto}}
@media (max-width:700px){.dashboard{grid-template-columns:1fr}.admin-table{min-width:720px}.table-card{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}}
@media (max-width:650px){.site-header .nav{gap:10px}.search-panel{flex-direction:column;align-items:stretch}.search-panel .btn{width:100%}.dashboard h2{font-size:2.4rem}.admin-subheader-inner{padding-left:10px;padding-right:10px}}
@media (max-width:480px){.search-panel{padding:14px}.dashboard{gap:15px}.dashboard .card{min-height:auto}.dashboard h2{font-size:2rem}.admin-table{min-width:680px}.admin-subheader a{font-size:.82rem;padding:8px 10px}}

.admin-header {
    position: relative;
    z-index: 1000;
    width: 100%;
}

.admin-header-main {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.admin-header-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.admin-brand-logo {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    flex: 0 0 54px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.admin-brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.admin-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.admin-brand-text strong {
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: .01em;
}

.admin-brand-text small {
    color: #777;
    font-size: .78rem;
    line-height: 1.2;
}

.admin-header-account {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    min-width: 0;
}

.admin-account-name {
    max-width: 260px;
    font-size: .9rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-account-role {
    color: #777;
    font-size: .75rem;
    text-transform: capitalize;
}

.admin-menu-toggle,
.admin-menu-close {
    border: 0;
    font: inherit;
    cursor: pointer;
}

.admin-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: inherit;
}

.admin-menu-toggle:hover,
.admin-menu-toggle:focus-visible {
    background: #f7f4ee;
}

.admin-menu-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 21px;
}

.admin-menu-icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.admin-menu-label {
    font-size: .84rem;
    font-weight: 700;
}

.admin-navigation-wrap {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 5px 18px rgba(0, 0, 0, .045);
}

.admin-navigation {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    min-height: 58px;
}

.admin-navigation-header {
    display: none;
}

.admin-navigation-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}

.admin-navigation-links a,
.admin-navigation-footer a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 11px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-size: .88rem;
    line-height: 1.2;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.admin-navigation-links a:hover,
.admin-navigation-links a:focus-visible {
    background: #f5f1e8;
}

.admin-navigation-links a.is-active {
    background: #f0eadc;
    font-weight: 700;
}

.admin-navigation-links a.is-active::after {
    content: "";
    position: absolute;
    right: 10px;
    bottom: 4px;
    left: 10px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold);
}

.admin-nav-icon {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    flex: 0 0 18px;
    font-size: 1rem;
    line-height: 1;
    opacity: .8;
}

.admin-navigation-footer {
    margin-left: auto;
    padding-left: 10px;
}

.admin-navigation-footer .admin-logout {
    color: #b42318;
}

.admin-navigation-footer .admin-logout:hover,
.admin-navigation-footer .admin-logout:focus-visible {
    background: #fff0ee;
}

.admin-navigation-overlay {
    display: none;
}

.admin-body.admin-menu-is-open {
    overflow: hidden;
}

@media (max-width: 1050px) {
    .admin-header-inner {
        min-height: 74px;
    }

    .admin-brand-logo {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .admin-navigation {
        width: min(100% - 20px, 1280px);
    }

    .admin-navigation-links a,
    .admin-navigation-footer a {
        padding-right: 9px;
        padding-left: 9px;
        font-size: .82rem;
    }
}

@media (max-width: 850px) {
    .admin-header-inner {
        min-height: 70px;
        gap: 12px;
    }

    .admin-header-account {
        display: none;
    }

    .admin-menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .admin-navigation-wrap {
        position: fixed;
        inset: 0;
        z-index: 1100;
        visibility: hidden;
        pointer-events: none;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .admin-navigation-overlay {
        position: absolute;
        inset: 0;
        display: block;
        background: rgba(15, 15, 15, .48);
        opacity: 0;
        transition: opacity .2s ease;
    }

    .admin-navigation {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(88vw, 360px);
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        overflow-y: auto;
        background: #fff;
        box-shadow: -12px 0 35px rgba(0, 0, 0, .16);
        transform: translateX(105%);
        transition: transform .24s ease;
    }

    .admin-navigation-header {
        min-height: 78px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 16px 18px;
        border-bottom: 1px solid var(--line);
    }

    .admin-navigation-header > div {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .admin-navigation-eyebrow {
        color: #888;
        font-size: .68rem;
        font-weight: 700;
        letter-spacing: .12em;
        text-transform: uppercase;
    }

    .admin-navigation-header strong {
        font-size: 1rem;
    }

    .admin-menu-close {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        flex: 0 0 42px;
        border: 1px solid var(--line);
        border-radius: 50%;
        background: #fff;
        color: inherit;
        font-size: 1.7rem;
        line-height: 1;
    }

    .admin-menu-close:hover,
    .admin-menu-close:focus-visible {
        background: #f5f1e8;
    }

    .admin-navigation-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 3px;
        padding: 14px;
    }

    .admin-navigation-links a,
    .admin-navigation-footer a {
        min-height: 48px;
        width: 100%;
        justify-content: flex-start;
        padding: 12px 14px;
        font-size: .92rem;
        border-radius: 9px;
    }

    .admin-navigation-links a.is-active::after {
        top: 9px;
        right: auto;
        bottom: 9px;
        left: 0;
        width: 3px;
        height: auto;
    }

    .admin-navigation-footer {
        margin-top: auto;
        padding: 14px;
        border-top: 1px solid var(--line);
    }

    .admin-navigation-footer .admin-logout {
        justify-content: center;
    }

    .admin-header.menu-open .admin-navigation-wrap {
        visibility: visible;
        pointer-events: auto;
    }

    .admin-header.menu-open .admin-navigation-overlay {
        opacity: 1;
    }

    .admin-header.menu-open .admin-navigation {
        transform: translateX(0);
    }
}

@media (max-width: 480px) {
    .admin-header-inner {
        padding-right: 12px;
        padding-left: 12px;
    }

    .admin-brand-logo {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .admin-brand-text strong {
        font-size: .9rem;
    }

    .admin-brand-text small {
        font-size: .7rem;
    }

    .admin-menu-toggle {
        min-height: 42px;
        padding: 7px 10px;
    }

    .admin-navigation {
        width: min(92vw, 350px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-navigation,
    .admin-navigation-overlay,
    .admin-navigation-links a,
    .admin-navigation-footer a {
        transition: none;
    }
}
