﻿:root {
    --bg: #030715;
    --panel: rgba(8, 18, 38, 0.86);
    --line: rgba(106, 207, 255, 0.24);
    --text: #f8fbff;
    --muted: #b9c8de;
    --cyan: #00c8ff;
    --violet: #7f42ff;
    --magenta: #e12cff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background: radial-gradient(circle at 20% 10%, rgba(0, 200, 255, 0.16), transparent 28%),
                radial-gradient(circle at 80% 2%, rgba(225, 44, 255, 0.14), transparent 28%),
                linear-gradient(180deg, #020511 0%, var(--bg) 100%);
    font-family: Inter, Segoe UI, Arial, sans-serif;
}

.login-shell {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.login-card,
.dashboard-hero,
.module-card,
.admin-header {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(18px);
}

.login-card {
    width: min(520px, 100%);
    padding: 30px;
    border-radius: 20px;
}

.brand-row,
.admin-logo,
.admin-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--violet), var(--magenta));
    box-shadow: 0 0 28px rgba(0, 200, 255, 0.22);
}

.brand-row strong,
.admin-logo span:last-child {
    display: block;
    font-size: 20px;
    font-weight: 850;
}

.brand-row span:not(.brand-mark) span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.eyebrow {
    margin: 28px 0 10px;
    color: var(--cyan);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1;
}

.lead,
.dashboard-hero p,
.module-card p {
    color: var(--muted);
    line-height: 1.6;
}

.admin-form {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.admin-form label {
    display: grid;
    min-width: 0;
    gap: 6px;
    color: #e7f2ff;
    font-size: 14px;
    font-weight: 750;
}

.admin-form input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(120, 215, 255, 0.22);
    border-radius: 10px;
    color: var(--text);
    background: rgba(2, 8, 18, 0.78);
    font: 650 14px/1 Inter, Segoe UI, Arial, sans-serif;
    outline: none;
}

.admin-form input[type="checkbox"],
.admin-form input[type="radio"] {
    width: auto;
    min-width: 16px;
    min-height: 16px;
    padding: 0;
    accent-color: var(--cyan);
}

.admin-form button,
.admin-user button {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    font-weight: 850;
    background: linear-gradient(135deg, var(--cyan), var(--violet), var(--magenta));
    cursor: pointer;
}

.admin-user button {
    min-height: 34px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.alert,
.field-error {
    color: #ff8fa3;
    font-weight: 750;
}

.alert {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 143, 163, 0.3);
    border-radius: 12px;
    background: rgba(255, 143, 163, 0.09);
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    border-width: 0 0 1px;
}

.admin-logo {
    color: var(--text);
    text-decoration: none;
}

.admin-user {
    color: var(--text);
    font-weight: 800;
}

.admin-user small {
    color: var(--muted);
    font-weight: 650;
}

.dashboard-shell {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: 44px 0 80px;
}

.dashboard-hero {
    padding: 34px;
    border-radius: 22px;
}

.dashboard-shell > .dashboard-hero + .settings-panel,
.dashboard-shell > .notice + .settings-panel,
.dashboard-shell > .alert + .settings-panel,
.dashboard-shell > .settings-panel + .settings-panel,
.dashboard-shell > .settings-panel + .account-table-panel,
.dashboard-shell > .account-table-panel + .settings-panel {
    margin-top: 24px;
}

.admin-list-panel {
    margin-top: 0;
}

.admin-list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-list-header h1 {
    margin-top: 10px;
    font-size: clamp(32px, 4vw, 46px);
}

.admin-list-count {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid rgba(120, 215, 255, 0.18);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    background: rgba(120, 215, 255, 0.08);
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    margin: 0 0 20px;
}

.admin-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-toolbar-compact {
    justify-content: flex-start;
}

.admin-toolbar-audit {
    align-items: end;
}

.admin-search,
.admin-toolbar-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: #e7f2ff;
    font-size: 13px;
    font-weight: 800;
}

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

.admin-search {
    flex: 1 1 320px;
}

.admin-search input,
.admin-toolbar-field input,
.admin-toolbar-field select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(120, 215, 255, 0.22);
    border-radius: 10px;
    color: var(--text);
    background: rgba(2, 8, 18, 0.78);
    font: 650 14px/1 Inter, Segoe UI, Arial, sans-serif;
    outline: none;
}

.toolbar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding-block: 0;
    margin-top: 0;
    white-space: nowrap;
}

.primary-action {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--violet), var(--magenta));
}

.secondary-action {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
}

.admin-form button.module-link.secondary-action {
    border: 1px solid rgba(120, 215, 255, 0.22);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.module-card {
    min-height: 190px;
    padding: 22px;
    border-radius: 18px;
}

.module-card span {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.module-card h2 {
    margin: 38px 0 10px;
    font-size: 24px;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.dashboard-kpi {
    display: grid;
    gap: 8px;
    min-height: 112px;
    padding: 16px;
    border: 1px solid rgba(120, 215, 255, 0.2);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    background: rgba(2, 8, 18, 0.45);
}

.dashboard-kpi:hover,
.dashboard-queue-list a:hover,
.dashboard-audit-list a:hover,
.dashboard-link-grid a:hover {
    border-color: rgba(0, 200, 255, 0.48);
    background: rgba(0, 200, 255, 0.09);
}

.dashboard-kpi span,
.dashboard-queue-list span,
.dashboard-link-grid span {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-kpi strong {
    font-size: 34px;
    line-height: 1;
}

.dashboard-kpi small,
.dashboard-link-grid small,
.dashboard-audit-list span {
    color: var(--muted);
    line-height: 1.45;
}

.dashboard-kpi.attention {
    border-color: rgba(225, 44, 255, 0.28);
}

.dashboard-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    gap: 16px;
    margin-top: 20px;
}

.dashboard-queue-list,
.dashboard-audit-list,
.dashboard-link-grid {
    display: grid;
    gap: 10px;
}

.dashboard-queue-list a,
.dashboard-audit-list a,
.dashboard-link-grid a {
    display: grid;
    min-width: 0;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid rgba(120, 215, 255, 0.14);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    background: rgba(2, 8, 18, 0.38);
}

.dashboard-queue-list a {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.dashboard-queue-list strong {
    font-size: 24px;
}

.dashboard-audit-list strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-link-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
}

.analytics-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.analytics-metric {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    min-height: 64px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.analytics-metric span {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.analytics-metric strong {
    color: var(--text);
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.metric-info {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 1px solid rgba(120, 215, 255, 0.28);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    background: rgba(120, 215, 255, 0.08);
    cursor: help;
}

@media (max-width: 820px) {
    .admin-header,
    .admin-user {
        align-items: flex-start;
        flex-direction: column;
    }

    .module-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-grid,
    .dashboard-overview-grid,
    .dashboard-link-grid {
        grid-template-columns: 1fr;
    }

    .analytics-metrics {
        grid-template-columns: 1fr;
    }
}

.module-link,
.admin-nav-link {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid rgba(120, 215, 255, 0.22);
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.07);
    cursor: pointer;
}

button.module-link {
    font-family: inherit;
}

.module-link {
    margin-top: 14px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.settings-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.settings-panel > .table-actions,
.settings-panel dl + .table-actions {
    margin-top: 18px;
}

.panel-status {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.settings-panel h2 {
    margin: 12px 0 18px;
    font-size: 26px;
}

.settings-panel dl {
    display: grid;
    gap: 1px;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(120, 215, 255, 0.12);
    border-radius: 14px;
    background: rgba(120, 215, 255, 0.12);
}

.settings-panel dl div {
    display: grid;
    grid-template-columns: minmax(140px, 0.45fr) minmax(0, 1fr);
    gap: 14px;
    padding: 13px 14px;
    background: rgba(2, 8, 18, 0.58);
}

.settings-panel dt {
    color: var(--muted);
    font-weight: 750;
}

.settings-panel dd {
    margin: 0;
    color: var(--text);
    overflow-wrap: anywhere;
    font-weight: 750;
}

@media (max-width: 820px) {
    .settings-grid,
    .settings-panel dl div {
        grid-template-columns: 1fr;
    }
}

.notice {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 200, 255, 0.28);
    border-radius: 12px;
    color: #dff8ff;
    font-weight: 750;
    background: rgba(0, 200, 255, 0.1);
}

.compact-hero h1 {
    font-size: clamp(34px, 4vw, 52px);
}

.admin-two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
    gap: 16px;
    margin-top: 20px;
}

.compact-form {
    margin-top: 16px;
}

.producer-preset-filter {
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.45fr) minmax(150px, 0.45fr) minmax(160px, 0.38fr);
    align-items: end;
}

.admin-form select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(120, 215, 255, 0.22);
    border-radius: 10px;
    color: var(--text);
    background: rgba(2, 8, 18, 0.78);
    font: 650 14px/1 Inter, Segoe UI, Arial, sans-serif;
    outline: none;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(120, 215, 255, 0.18);
    border-radius: 12px;
}

.check-grid legend {
    padding: 0 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}

.check-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.form-note {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.account-table-panel {
    margin-top: 20px;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text);
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(120, 215, 255, 0.13);
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-pill {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(120, 215, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    font-size: 12px;
    font-weight: 850;
}

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

.table-actions .module-link {
    margin-top: 0;
}

.table-actions form {
    margin: 0;
}

.table-actions .module-link,
.table-actions .danger-button {
    min-height: 38px;
    padding-inline: 14px;
}

.danger-button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(255, 143, 163, 0.35);
    border-radius: 10px;
    color: #ffd5dc;
    font-weight: 850;
    background: rgba(255, 143, 163, 0.1);
    cursor: pointer;
}

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

.admin-ticket-card {
    margin: 0;
}

.admin-ticket-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.admin-ticket-header h3 {
    margin: 0 0 4px;
}

.admin-ticket-header p,
.admin-ticket-header small {
    margin: 0;
    color: var(--muted);
}

.admin-ticket-thread {
    display: grid;
    gap: 14px;
    margin-bottom: 0;
}

.admin-ticket-message {
    border-left: 3px solid var(--cyan);
    border-radius: 6px;
    background: rgba(120, 215, 255, 0.08);
    padding: 14px 16px;
}

.admin-ticket-message.admin {
    border-left-color: #54d49a;
    background: rgba(84, 212, 154, 0.08);
}

.admin-ticket-message strong {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.admin-ticket-message strong span,
.admin-ticket-message small {
    color: var(--muted);
    font-size: 12px;
}

.admin-ticket-message p {
    margin: 8px 0 10px;
    white-space: pre-wrap;
}

.admin-ticket-message:last-child {
    margin-bottom: 0;
}

@media (max-width: 820px) {
    .admin-two-column,
    .check-grid {
        grid-template-columns: 1fr;
    }
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
    gap: 10px;
}

.form-row > * {
    min-width: 0;
}

.table-title-link {
    color: #eaf8ff;
    font-weight: 850;
    text-decoration: none;
}

.table-title-link:hover {
    color: var(--cyan);
}

@media (max-width: 820px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.admin-form textarea {
    width: 100%;
    min-width: 0;
    min-height: 92px;
    padding: 12px 14px;
    border: 1px solid rgba(120, 215, 255, 0.22);
    border-radius: 10px;
    color: var(--text);
    background: rgba(2, 8, 18, 0.78);
    font: 650 14px/1.45 Inter, Segoe UI, Arial, sans-serif;
    resize: vertical;
    outline: none;
}

.admin-form textarea[rows="6"] {
    min-height: 160px;
}

.settings-panel .admin-form button[type="submit"] {
    margin-top: 2px;
}

.inline-check {
    display: inline-flex !important;
    min-height: 42px;
    align-self: end;
    grid-template-columns: none !important;
    align-items: center;
    justify-content: flex-start;
    gap: 10px !important;
    padding: 0 12px;
    border: 1px solid rgba(120, 215, 255, 0.22);
    border-radius: 10px;
    background: rgba(2, 8, 18, 0.5);
}

.inline-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    padding: 0;
    accent-color: var(--cyan);
}

.mono-cell {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: Consolas, monospace;
    font-size: 12px;
}

.muted-small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.admin-modal-open {
    overflow: hidden;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    place-items: center;
    padding: 24px;
}

.admin-modal.open {
    display: grid;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 5, 14, 0.76);
    backdrop-filter: blur(10px);
}

.admin-modal-panel {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(720px, calc(100svh - 48px));
    overflow: auto;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--text);
    background: rgba(8, 18, 38, 0.98);
    box-shadow: 0 32px 110px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.admin-modal-wide .admin-modal-panel {
    width: min(760px, 100%);
}

.admin-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.admin-modal-header h2 {
    margin: 10px 0 0;
    font-size: 28px;
}

.admin-icon-button {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(120, 215, 255, 0.22);
    border-radius: 10px;
    color: var(--text);
    font-size: 24px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.07);
    cursor: pointer;
}

.admin-modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
}

.admin-modal-actions > * {
    width: 100%;
    min-height: 48px;
}

.admin-modal-actions button,
.admin-modal-actions .module-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    padding: 0 16px;
}

.admin-modal-detail {
    display: grid;
    gap: 1px;
    margin: 18px 0 0;
    overflow: hidden;
    border: 1px solid rgba(120, 215, 255, 0.12);
    border-radius: 14px;
    background: rgba(120, 215, 255, 0.12);
}

.admin-modal-detail div {
    display: grid;
    grid-template-columns: minmax(120px, 0.4fr) minmax(0, 1fr);
    gap: 14px;
    padding: 13px 14px;
    background: rgba(2, 8, 18, 0.58);
}

.admin-modal-detail dt {
    color: var(--muted);
    font-weight: 750;
}

.admin-modal-detail dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 750;
}


.admin-visit-link {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 0 13px;
    border: 1px solid rgba(120, 215, 255, 0.22);
    border-radius: 10px;
    color: #dff8ff;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
    background: rgba(0, 200, 255, 0.08);
}

.admin-visit-link:hover {
    border-color: rgba(0, 200, 255, 0.5);
    color: #ffffff;
    background: rgba(0, 200, 255, 0.14);
}

.preset-triple-row {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr) minmax(0, 0.85fr);
    gap: 14px;
}

.preset-price-row {
    grid-template-columns: minmax(0, 0.74fr) minmax(0, 1fr) minmax(88px, 112px);
    column-gap: 14px;
    row-gap: 14px;
    align-items: end;
}

.preset-price-row .inline-check {
    width: 100%;
    justify-content: center;
}

@media (max-width: 820px) {
    .admin-visit-link {
        margin-left: 0;
    }

    .preset-triple-row,
    .preset-price-row {
        grid-template-columns: 1fr;
    }

    .preset-price-row .inline-check {
        justify-content: flex-start;
    }
}


.admin-app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100svh;
}

@media (max-width: 1320px) {
    .admin-two-column {
        grid-template-columns: 1fr;
    }

    .admin-two-column .preset-triple-row,
    .admin-two-column .preset-price-row {
        grid-template-columns: 1fr;
    }

    .admin-two-column .preset-price-row .inline-check {
        justify-content: flex-start;
    }
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100svh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    border-right: 1px solid var(--line);
    background: rgba(5, 14, 31, 0.88);
    box-shadow: 22px 0 70px rgba(0, 0, 0, 0.24), inset -1px 0 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
}

.admin-sidebar-logo {
    min-height: 58px;
    padding: 8px 6px;
}

.admin-sidebar-nav {
    display: grid;
    gap: 8px;
    margin-top: 6px;
}

.admin-sidebar-nav a {
    display: flex;
    min-height: 44px;
    align-items: center;
    min-width: 0;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 850;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-sidebar-nav a:hover,
.admin-sidebar-nav a.active {
    border-color: rgba(120, 215, 255, 0.28);
    color: #ffffff;
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.16), rgba(225, 44, 255, 0.12));
}

.sidebar-visit-link {
    width: 100%;
    margin: auto 0 0;
}

.admin-main-shell {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 14, 31, 0.82);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
}

.admin-topbar strong,
.admin-topbar small {
    display: block;
}

.admin-topbar small {
    margin-top: 3px;
    color: var(--muted);
    font-weight: 650;
}

.admin-topbar button {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    color: #ffffff;
    font-weight: 850;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

[data-admin-content] {
    min-width: 0;
}

.admin-app-shell .dashboard-shell {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: 28px 0 72px;
}

html.admin-page-loading [data-admin-content] {
    opacity: 0.985;
}

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

    .admin-sidebar {
        position: relative;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 18px;
    }

    .admin-sidebar-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sidebar-visit-link {
        margin-top: 8px;
    }
}

@media (max-width: 1100px) {
    .admin-two-column,
    .producer-preset-filter {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .admin-sidebar-nav {
        grid-template-columns: 1fr;
    }

    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-shell > .dashboard-hero + .settings-panel,
    .dashboard-shell > .notice + .settings-panel,
    .dashboard-shell > .alert + .settings-panel,
    .dashboard-shell > .settings-panel + .settings-panel,
    .dashboard-shell > .settings-panel + .account-table-panel,
    .dashboard-shell > .account-table-panel + .settings-panel {
        margin-top: 18px;
    }

    .settings-panel {
        padding: 18px;
    }

    .admin-list-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-toolbar-actions {
        justify-content: stretch;
    }

    .admin-search,
    .admin-toolbar-field {
        flex: 1 1 auto;
        width: 100%;
    }

    .toolbar-button {
        width: 100%;
    }

    .admin-modal {
        padding: 14px;
    }

    .admin-modal-panel {
        max-height: calc(100svh - 28px);
        padding: 18px;
    }

    .admin-modal-actions {
        grid-template-columns: 1fr;
    }

    .table-actions {
        gap: 8px;
    }

    .table-actions .module-link,
    .table-actions .danger-button {
        min-height: 36px;
    }
}
