:root {
    color-scheme: light;
    --paper: #f1efe9;
    --paper-light: #f8f7f3;
    --white: #fff;
    --ink: #151817;
    --muted: #747b78;
    --rule: #cfd0ca;
    --orange: #ef4d18;
    --error: #a53b31;
    --error-bg: #f8e9e5;
    --success: #2d6c55;
    --success-bg: #e5f1eb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

a {
    color: var(--ink);
}

button, input, select, textarea {
    font: inherit;
}

.admin-muted {
    color: var(--muted);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
}

.admin-wordmark {
    font-weight: 800;
    letter-spacing: .04em;
    text-decoration: none;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
}

.admin-nav a[aria-current="page"] {
    color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.admin-header-user {
    color: var(--muted);
}

.admin-link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    text-decoration: underline;
    cursor: pointer;
}

.admin-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.admin-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.admin-panel {
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--rule);
}

.admin-panel h2,
.admin-panel h3 {
    margin: 0 0 12px;
}

.admin-stat {
    font-size: 28px;
    font-weight: 800;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border: 1px solid var(--rule);
    background: var(--paper-light);
    font-size: 12px;
    white-space: nowrap;
}

.admin-badge-active { border-color: #9bc8b2; color: var(--success); background: var(--success-bg); }
.admin-badge-draft,
.admin-badge-pending,
.admin-badge-warning { color: #8a650e; background: #fff5d8; border-color: #e7d28e; }
.admin-badge-inactive,
.admin-badge-archived,
.admin-badge-deleted { color: var(--muted); }
.admin-badge-suspended { border-color: #e2bcb4; color: var(--error); background: var(--error-bg); }
.admin-badge-neutral { border-color: var(--rule); color: var(--ink); background: var(--paper-light); }

.admin-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.admin-main h1 {
    margin: 0 0 4px;
    font-size: 24px;
}

.admin-block {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--rule);
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px 24px;
    margin: 0 0 18px;
}

.admin-detail-grid > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-detail-grid strong {
    font-size: 18px;
    font-weight: 700;
}

.admin-block h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.admin-gate-list {
    margin: 0 0 12px;
    padding-left: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    border: 1px solid var(--rule);
    text-align: left;
    font-size: 14px;
}

.admin-table th {
    background: var(--paper-light);
    font-weight: 700;
}

.admin-table tbody tr:hover {
    background: var(--paper-light);
}

.admin-empty {
    padding: 32px 16px;
    color: var(--muted);
    text-align: center;
}

.admin-notice {
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid;
    font-size: 14px;
}

.admin-notice-error {
    border-color: #e2bcb4;
    color: var(--error);
    background: var(--error-bg);
}

.admin-notice-success {
    border-color: #b5d4c4;
    color: var(--success);
    background: var(--success-bg);
}

.admin-inline-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-inline-form label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
}

.admin-inline-form input[type="text"],
.admin-inline-form input[type="number"],
.admin-inline-form input[type="datetime-local"],
.admin-inline-form select {
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--rule);
    background: var(--white);
    color: var(--ink);
}

.admin-form-wide {
    display: grid;
    gap: 22px;
}

.admin-form-section {
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--rule);
}

.admin-form-section h2 {
    margin: 0 0 16px;
    font-size: 17px;
}

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

.admin-field-grid .admin-field-full {
    grid-column: 1 / -1;
}

.admin-field {
    display: grid;
    align-content: start;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
}

.admin-search-field {
    width: min(100%, 320px);
}

.admin-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.admin-field small {
    color: var(--muted);
    font-weight: 400;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid var(--rule);
    background: var(--white);
    color: var(--ink);
}

.admin-field textarea {
    min-height: 100px;
    resize: vertical;
}

.admin-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.admin-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--rule);
    background: var(--paper-light);
    font-size: 13px;
}

.admin-check input { margin-top: 3px; }

.admin-code {
    max-width: 440px;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.admin-table-user:hover .admin-table-user-name {
    text-decoration: underline;
}

.admin-table-user-text {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.admin-table-user-name {
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-table-user-id {
    color: var(--muted);
    font-weight: 400;
}

.admin-table-user-text small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-table-meta {
    display: grid;
    gap: 2px;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 860px) {
    .admin-header,
    .admin-page-head { align-items: flex-start; flex-direction: column; }
    .admin-nav { flex-wrap: wrap; gap: 10px 14px; }
    .admin-field-grid { grid-template-columns: 1fr; }
    .admin-field-grid .admin-field-full { grid-column: auto; }
    .admin-inline-form { align-items: stretch; flex-direction: column; }
}

.admin-button {
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--white);
    cursor: pointer;
}

.admin-button:hover {
    background: var(--orange);
    border-color: var(--orange);
}

.admin-button-danger {
    background: var(--white);
    color: var(--error);
    border-color: var(--error);
}

.admin-button-danger:hover {
    background: var(--error);
    color: var(--white);
}

.admin-button-secondary {
    background: var(--white);
    color: var(--ink);
    border-color: var(--rule);
}

.admin-button-secondary:hover {
    background: var(--paper-light);
    border-color: var(--ink);
}

.admin-button-small {
    height: 28px;
    padding: 0 10px;
    font-size: .8rem;
}

/* Stylet confirm-modal (assets/js/admin.js) - erstatter browserens native confirm(). */
.admin-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px;
    background: rgba(21, 24, 23, 0.45);
    z-index: 250;
    overflow-y: auto;
}

.admin-modal-overlay.active {
    display: flex;
}

.admin-modal-box {
    width: 100%;
    max-width: 380px;
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--rule);
}

.admin-confirm-modal-message {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

.admin-confirm-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.admin-confirm-modal-actions .admin-button {
    flex: 1;
}

body.admin-auth-page,
.admin-auth-main {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.admin-card {
    width: min(100%, 380px);
    padding: 32px;
    background: var(--white);
    border: 1px solid var(--rule);
}

.admin-card h1 {
    margin: 0 0 20px;
    font-size: 20px;
}

.admin-form {
    display: grid;
    gap: 16px;
}

.admin-form label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
}

.admin-form input {
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--rule);
    background: var(--white);
    color: var(--ink);
}

.admin-submit {
    height: 42px;
    border: 0;
    background: var(--ink);
    color: var(--white);
    cursor: pointer;
    font-weight: 700;
}

.admin-submit:hover {
    background: var(--orange);
}

/* Paneldrift layout 2026 */
:root {
    --sidebar-width: 268px;
    --paper: #f4f5f2;
    --paper-light: #fafbf8;
    --white: #ffffff;
    --ink: #18201d;
    --muted: #69736e;
    --rule: #dfe3de;
    --rule-dark: #cbd1cb;
    --orange: #d94b1d;
    --orange-soft: #fff0e9;
    --sidebar: #111a17;
    --sidebar-muted: #82908a;
    --sidebar-rule: rgba(255, 255, 255, .09);
    --shadow: 0 10px 35px rgba(26, 37, 32, .06);
}

html {
    background: var(--paper);
}

body {
    min-height: 100vh;
    background: var(--paper);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(217, 75, 29, .3);
    outline-offset: 2px;
}

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

.admin-nav-overlay[hidden] {
    display: none !important;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 400;
    display: flex;
    width: var(--sidebar-width);
    min-height: 100vh;
    flex-direction: column;
    background: var(--sidebar);
    color: #fff;
    box-shadow: 8px 0 30px rgba(10, 18, 15, .08);
}

.admin-sidebar-brand {
    display: flex;
    min-height: 92px;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border-bottom: 1px solid var(--sidebar-rule);
}

.admin-wordmark,
.admin-mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.admin-brand-mark {
    display: inline-grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 11px;
    background: var(--orange);
    color: #fff;
    font-size: 21px;
    font-weight: 900;
    line-height: 1;
}

.admin-brand-text {
    display: grid;
    gap: 1px;
}

.admin-brand-text strong {
    font-size: 16px;
    letter-spacing: .015em;
}

.admin-brand-text small {
    color: var(--sidebar-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.admin-menu-close {
    display: none;
}

.admin-nav {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 25px;
    padding: 23px 14px;
    overflow-y: auto;
    font-size: 14px;
}

.admin-nav-group {
    display: grid;
    gap: 4px;
}

.admin-nav-label {
    margin: 0 0 6px;
    padding: 0 12px;
    color: var(--sidebar-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.admin-nav a {
    display: flex;
    min-height: 43px;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 9px;
    color: #c8d0cc;
    font-weight: 600;
    text-decoration: none;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, .055);
    color: #fff;
}

.admin-nav a[aria-current="page"] {
    background: var(--orange);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 7px 20px rgba(217, 75, 29, .22);
}

.admin-nav-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-sidebar-footer {
    padding: 15px 14px 17px;
    border-top: 1px solid var(--sidebar-rule);
}

.admin-user {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    padding: 7px 8px 12px;
}

.admin-user-avatar,
.admin-list-avatar {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 50%;
    background: #e8ece8;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
}

.admin-user-avatar {
    background: rgba(255, 255, 255, .11);
    color: #fff;
}

.admin-user-details {
    display: grid;
    min-width: 0;
    flex: 1;
}

.admin-user-details strong {
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-details small {
    color: var(--sidebar-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.admin-sidebar-footer form {
    margin: 0;
}

.admin-logout-button {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    gap: 12px;
    padding: 8px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--sidebar-muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

.admin-logout-button:hover {
    background: rgba(255, 255, 255, .055);
    color: #fff;
}

.admin-main {
    width: auto;
    max-width: 1600px;
    min-width: 0;
    margin: 0 0 0 var(--sidebar-width);
    padding: 40px 42px 80px;
}

.admin-main h1 {
    font-size: clamp(27px, 2.3vw, 34px);
    line-height: 1.16;
    letter-spacing: -.025em;
}

.admin-page-head {
    margin-bottom: 28px;
}

.admin-page-head .admin-muted {
    max-width: 820px;
    margin: 7px 0 0;
}

/* Bruger-underfaner (Overblik, Konto, Kreditter, Adgang, Filer, Ordrer, Support, Sikkerhed). */
.admin-user-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 18px;
    padding: 10px;
    border: 1px solid var(--rule);
    border-radius: 12px;
    background: var(--paper-light);
}

.admin-user-section-nav a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #35413d;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.admin-user-section-nav a:hover {
    border-color: #d7d7d2;
    background: #fff;
    color: var(--ink);
}

.admin-user-section-nav a[aria-current="page"] {
    border-color: var(--orange);
    background: var(--orange);
    color: #fff;
    box-shadow: 0 6px 16px rgba(239, 77, 24, .24);
}

.admin-user-section-nav a:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--orange) 55%, white);
    outline-offset: 1px;
}

.admin-user-page-nav {
    position: sticky;
    top: 12px;
    z-index: 40;
    backdrop-filter: blur(10px);
}

@media (max-width: 760px) {
    .admin-user-section-nav {
        margin-bottom: 14px;
        padding: 8px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: thin;
    }

    .admin-user-section-nav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .admin-user-page-nav {
        top: 76px;
    }
}

.admin-eyebrow {
    margin: 0 0 5px;
    color: var(--orange);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.admin-panel,
.admin-form-section {
    border-color: var(--rule);
    border-radius: 13px;
    box-shadow: var(--shadow);
}

.admin-table-wrap {
    border: 1px solid var(--rule);
    border-radius: 13px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.admin-table {
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
}

.admin-table th,
.admin-table td {
    padding: 13px 14px;
    border: 0;
    border-bottom: 1px solid var(--rule);
}

.admin-table th {
    background: #f8f9f6;
    color: #515d57;
    font-size: 11px;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: #fbfcf9;
}

.admin-field input,
.admin-field select,
.admin-field textarea,
.admin-form input,
.admin-inline-form input[type="text"],
.admin-inline-form input[type="number"],
.admin-inline-form input[type="datetime-local"],
.admin-inline-form select {
    border-color: var(--rule-dark);
    border-radius: 7px;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus,
.admin-form input:focus {
    border-color: var(--orange);
}

.admin-button,
.admin-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-weight: 700;
    text-decoration: none;
}

/* Fuld-bredde top-toast: .admin-notice ligger stadig som almindeligt markup nederst i hver
   sides PHP (uændret i alle sider), men vises nu fast øverst i vinduet i stedet for at skubbe
   indholdet ned. Luk-knap og auto-skjul tilføjes af assets/js/admin.js. */
.admin-notice {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0;
    padding: 14px 52px 14px 24px;
    border: 0;
    border-bottom: 3px solid;
    border-radius: 0;
    box-shadow: 0 12px 30px rgba(20, 30, 26, .14);
    font-weight: 600;
    text-align: center;
    animation: admin-toast-in .25s ease;
}

.admin-notice ~ .admin-notice {
    top: 54px;
}

.admin-notice-hide {
    animation: admin-toast-out .2s ease forwards;
}

.admin-notice-close {
    position: absolute;
    right: 16px;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .07);
    color: inherit;
    cursor: pointer;
    font-size: 19px;
    line-height: 1;
}

.admin-notice-close:hover {
    background: rgba(0, 0, 0, .13);
}

@keyframes admin-toast-in {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes admin-toast-out {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-100%); opacity: 0; }
}

@media (max-width: 700px) {
    .admin-notice {
        padding-right: 44px;
        padding-left: 16px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-notice,
    .admin-notice-hide {
        animation: none;
    }

    .admin-notice-hide {
        opacity: 0;
    }
}

.admin-badge {
    border-radius: 999px;
    font-weight: 700;
}

.admin-card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(22, 32, 28, .13);
}

body.admin-auth-page {
    background: radial-gradient(circle at 15% 10%, #fff 0, transparent 35%), var(--paper);
}

.admin-dashboard-head {
    align-items: flex-end;
}

.admin-dashboard-date {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.admin-stat-card {
    position: relative;
    display: grid;
    min-height: 158px;
    align-content: space-between;
    padding: 21px 22px;
    overflow: hidden;
    border: 1px solid var(--rule);
    border-radius: 13px;
    background: var(--white);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.admin-stat-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--orange);
    content: "";
    opacity: 0;
    transition: opacity .16s ease;
}

.admin-stat-card::after {
    position: absolute;
    top: 18px;
    right: 20px;
    color: #a9b1ad;
    content: "→";
    font-size: 18px;
}

.admin-stat-card:hover {
    border-color: #cbd1cb;
    box-shadow: 0 14px 40px rgba(26, 37, 32, .1);
    transform: translateY(-2px);
}

.admin-stat-card:hover::before {
    opacity: 1;
}

.admin-stat-card-active {
    border-color: var(--orange);
    background: var(--orange-soft);
}

.admin-stat-card-active::before {
    opacity: 1;
}

.admin-stat-card-active .admin-stat-label {
    color: var(--orange);
}

.admin-stat-label {
    padding-right: 30px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.admin-stat-card strong {
    margin: 10px 0 4px;
    font-size: clamp(29px, 3vw, 40px);
    line-height: 1;
    letter-spacing: -.04em;
}

.admin-stat-meta {
    color: #7a8580;
    font-size: 11px;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
    gap: 18px;
}

.admin-dashboard-panel {
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

.admin-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.admin-dashboard-panel > .admin-section-head {
    padding: 21px 22px 17px;
    border-bottom: 1px solid var(--rule);
}

.admin-section-head h2 {
    margin: 0;
    font-size: 17px;
    letter-spacing: -.015em;
}

.admin-section-head a {
    color: var(--orange);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.admin-section-head a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.admin-list {
    display: grid;
}

.admin-list-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 13px 22px;
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
}

a.admin-list-row:hover {
    background: #fafbf8;
}

.admin-list-row:last-child {
    border-bottom: 0;
}

.admin-list-content {
    display: grid;
    min-width: 0;
    flex: 1;
}

.admin-list-content strong,
.admin-list-content small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-list-content strong {
    font-size: 13px;
}

.admin-list-content small,
.admin-list-meta small {
    color: var(--muted);
    font-size: 10px;
}

.admin-list-meta {
    display: grid;
    flex: 0 0 auto;
    justify-items: end;
    gap: 3px;
    text-align: right;
}

.admin-activity-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 0 4px var(--orange-soft);
}

.admin-quick-section {
    margin-top: 30px;
}

.admin-quick-section > .admin-section-head {
    margin-bottom: 13px;
}

.admin-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.admin-quick-grid a {
    display: grid;
    gap: 3px;
    min-height: 78px;
    align-content: center;
    padding: 15px 18px;
    border: 1px solid var(--rule);
    border-radius: 11px;
    background: rgba(255, 255, 255, .66);
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease;
}

.admin-quick-grid a:hover {
    border-color: #c5ccc6;
    background: var(--white);
}

.admin-quick-grid span {
    font-size: 13px;
    font-weight: 800;
}

.admin-quick-grid small {
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 1180px) {
    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .admin-mobile-header {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 350;
        display: flex;
        height: 64px;
        align-items: center;
        justify-content: space-between;
        padding: 0 18px;
        border-bottom: 1px solid var(--rule);
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 4px 20px rgba(20, 30, 26, .05);
        backdrop-filter: blur(12px);
    }

    .admin-mobile-brand {
        color: var(--ink);
        font-size: 14px;
        font-weight: 800;
    }

    .admin-mobile-brand .admin-brand-mark {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 9px;
        font-size: 17px;
    }

    .admin-menu-toggle {
        display: grid;
        width: 42px;
        height: 42px;
        place-content: center;
        gap: 4px;
        border: 0;
        border-radius: 9px;
        background: #f2f4f1;
        cursor: pointer;
    }

    .admin-menu-toggle > span:not(.admin-sr-only) {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 1px;
        background: var(--ink);
    }

    .admin-sidebar {
        width: min(var(--sidebar-width), calc(100vw - 42px));
        transform: translateX(-105%);
        transition: transform .22s ease;
    }

    body.admin-menu-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-menu-close {
        display: grid;
        width: 36px;
        height: 36px;
        place-items: center;
        border: 0;
        border-radius: 8px;
        background: rgba(255, 255, 255, .06);
        color: #fff;
        cursor: pointer;
        font-size: 25px;
        line-height: 1;
    }

    .admin-nav-overlay {
        position: fixed;
        inset: 0;
        z-index: 390;
        display: block;
        background: rgba(7, 14, 11, .55);
        backdrop-filter: blur(2px);
    }

    .admin-main {
        width: auto;
        max-width: none;
        margin-left: 0;
        padding: 96px 24px 64px;
    }
}

@media (max-width: 700px) {
    .admin-main {
        padding-right: 16px;
        padding-left: 16px;
    }

    .admin-stats-grid,
    .admin-quick-grid {
        grid-template-columns: 1fr;
    }

    .admin-stat-card {
        min-height: 132px;
    }

    .admin-dashboard-date {
        display: none;
    }

    .admin-dashboard-panel > .admin-section-head,
    .admin-list-row {
        padding-right: 16px;
        padding-left: 16px;
    }

    .admin-list-meta small {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

