:root {
    --bg: #0b1220;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --panel-muted: rgba(20, 29, 48, 0.72);
    --stroke: rgba(148, 163, 184, 0.14);
    --stroke-strong: rgba(148, 163, 184, 0.24);
    --text: #e5eefc;
    --text-strong: #f8fbff;
    --muted: #94a3b8;
    --blue: #4f7cff;
    --blue-2: #6d98ff;
    --cyan: #2dd4bf;
    --green: #22c55e;
    --amber: #f59e0b;
    --red: #ef4444;
    --shadow: 0 20px 50px rgba(2, 6, 23, 0.34);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --sidebar-width: 272px;
    --content-max: 1520px;
    --font-main: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-main);
    background:
        radial-gradient(circle at top left, rgba(79, 124, 255, 0.18), transparent 24%),
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.10), transparent 20%),
        linear-gradient(180deg, #0b1220 0%, #0d1526 100%);
    color: var(--text);
}

body {
    line-height: 1.5;
}

a {
    color: inherit;
}

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

button {
    cursor: pointer;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--panel-strong);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.login-card h1 {
    margin: 0 0 12px;
    font-size: 28px;
    color: var(--text-strong);
}

.login-card p {
    margin: 0 0 24px;
    color: var(--muted);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--muted);
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--stroke-strong);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    outline: none;
}

.form-group input:focus {
    border-color: rgba(79, 124, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
}

input[type="date"] {
    color-scheme: dark;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='4' y='5' width='16' height='15' rx='3' stroke='%23EAF2FF' stroke-width='2'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16M8 14h3M13 14h3M8 17h5' stroke='%23EAF2FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px 18px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    width: 26px;
    height: 26px;
    margin-right: -4px;
    opacity: 0;
    cursor: pointer;
}

.ui-temporal-range {
    --ui-temporal-range-gap: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ui-temporal-range-gap);
    align-items: end;
    min-width: 0;
}

.ui-temporal-range > .field,
.ui-temporal-range > .form-group,
.ui-temporal-range > .montages-filter {
    min-width: 0;
}

.ui-temporal-control {
    --ui-temporal-height: 40px;
    --ui-temporal-radius: 12px;
    --ui-temporal-padding-left: 12px;
    --ui-temporal-icon-size: 20px;
    --ui-temporal-icon-right: 12px;
    --ui-temporal-font-size: 13px;
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: var(--ui-temporal-height);
    min-height: var(--ui-temporal-height);
    padding: 0 calc(var(--ui-temporal-icon-right) + var(--ui-temporal-icon-size) + 10px) 0 var(--ui-temporal-padding-left);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--ui-temporal-radius);
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    overflow: hidden;
}

.ui-temporal-control:focus-within {
    border-color: rgba(79, 124, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
}

.ui-temporal-control--disabled {
    opacity: 0.58;
}

.ui-temporal-control__value {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    color: #e5eefc;
    font-size: var(--ui-temporal-font-size);
    font-weight: 500;
    line-height: 1;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ui-temporal-control--empty .ui-temporal-control__value {
    color: #93a6c7;
}

.ui-temporal-control__icon {
    position: absolute;
    top: 50%;
    right: var(--ui-temporal-icon-right);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ui-temporal-icon-size);
    height: var(--ui-temporal-icon-size);
    color: #eaf2ff;
    transform: translateY(-50%);
    pointer-events: none;
}

.ui-temporal-control__icon svg {
    display: block;
    width: var(--ui-temporal-icon-size);
    height: var(--ui-temporal-icon-size);
    fill: none;
}

.ui-temporal-control__icon rect,
.ui-temporal-control__icon circle,
.ui-temporal-control__icon path {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ui-temporal-control__input {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: transparent;
    cursor: pointer;
    font-size: 16px;
    opacity: 0;
}

.ui-temporal-control__input:disabled {
    cursor: default;
}

.ui-temporal-control__input::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

@media (max-width: 410px) {
    .ui-temporal-range {
        grid-template-columns: minmax(0, 1fr);
    }
}

.login-card .btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

.form-error {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, 0.24);
    border-radius: 12px;
    background: rgba(127, 29, 29, 0.22);
    color: #fecaca;
    font-size: 14px;
}

.page {
    min-height: 100vh;
    padding: 32px;
}

.page-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: var(--panel-strong);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}

.page-card--wide {
    max-width: 1100px;
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    background: transparent;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 16px;
    border-right: 1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(7, 14, 28, 0.92), rgba(10, 17, 32, 0.82));
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 14px 20px 18px;
    margin-bottom: 12px;
}

.sidebar__brand-logo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.sidebar__brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    box-shadow: 0 10px 30px rgba(79, 124, 255, 0.30);
}

.sidebar__brand-title {
    font-size: 20px;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--text-strong);
}

.sidebar__brand-subtitle {
    margin-top: 0;
    font-size: 13px;
    color: var(--muted);
}

.sidebar__nav {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}

.sidebar__link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: #cfe0ff;
    text-decoration: none;
    font-weight: 600;
    transition: 0.22s ease;
}

.sidebar__link:hover {
    background: rgba(79, 124, 255, 0.10);
    border-color: rgba(79, 124, 255, 0.18);
    transform: translateX(2px);
}

.sidebar__link--active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(79, 124, 255, 0.24), rgba(109, 152, 255, 0.16));
    border-color: rgba(109, 152, 255, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sidebar__account {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(109, 152, 255, 0.24);
}

.sidebar__account-main {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.sidebar__account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(45, 212, 191, 0.34);
    border-radius: 13px;
    background: rgba(20, 184, 166, 0.10);
    color: #ccfbf1;
    font-size: 15px;
    font-weight: 900;
}

.sidebar__account-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.sidebar__account-name,
.sidebar__account-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar__account-name {
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 800;
}

.sidebar__account-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.sidebar__account-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.sidebar__account-location {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 5px 9px;
    border: 1px solid rgba(79, 124, 255, 0.22);
    border-radius: 999px;
    background: rgba(79, 124, 255, 0.10);
    color: #dbe7ff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.sidebar__account-location--muted {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(148, 163, 184, 0.08);
    color: #a7b6ca;
}

.sidebar__account-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.sidebar__account-actions form {
    margin: 0;
}

.sidebar__account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    padding: 9px 10px;
    border: 1px solid var(--stroke-strong);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.50);
    color: #dbeafe;
    font-size: 13px;
    font-weight: 800;
}

.sidebar__account-btn:hover {
    background: rgba(79, 124, 255, 0.12);
    border-color: rgba(79, 124, 255, 0.28);
}

.main-content {
    padding: 20px 24px 28px 30px;
}

.content-shell {
    max-width: none;
    margin: 0;
    display: grid;
    gap: 22px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.topbar__main {
    max-width: 920px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    margin-bottom: 12px;
    border-radius: 999px;
    border: 1px solid rgba(79, 124, 255, 0.24);
    background: rgba(79, 124, 255, 0.10);
    color: #dbe7ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-title {
    margin: 0;
    font-size: clamp(30px, 3vw, 40px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-strong);
}

.page-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

.btn--primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    box-shadow: 0 12px 30px rgba(79, 124, 255, 0.28);
}

.btn--primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.btn--secondary {
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.48);
    border-color: var(--stroke-strong);
}

.btn--secondary:hover {
    background: rgba(15, 23, 42, 0.68);
}

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

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 154px;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.82), rgba(15, 23, 42, 0.92));
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -30px -30px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 124, 255, 0.22), transparent 68%);
    pointer-events: none;
}

.stat-card__label {
    margin-bottom: 12px;
    color: #d9e7ff;
    font-size: 14px;
    font-weight: 700;
}

.stat-card__value {
    color: var(--text-strong);
    font-size: clamp(34px, 4vw, 46px);
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.stat-card--payment {
    min-height: 154px;
    padding: 12px 14px;
}

.payment-donut {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.payment-donut__svg {
    width: 124px;
    height: 124px;
    display: block;
    overflow: visible;
    transform: scale(1.1);
    transform-origin: center center;
}

.payment-donut__track,
.payment-donut__seg {
    fill: none;
    stroke-width: 12;
}

.payment-donut__track {
    stroke: rgba(148, 163, 184, 0.16);
}

.payment-donut__seg {
    transform: rotate(-90deg);
    transform-origin: 60px 60px;
    stroke-linecap: butt;
}

.payment-donut__seg--cash {
    stroke: #f59e0b;
}

.payment-donut__seg--transfer {
    stroke: #22c55e;
}

.payment-donut__seg--nds {
    stroke: #38bdf8;
}

.payment-donut__center-value {
    fill: #eef4ff;
    font-size: 18px;
    font-weight: 800;
}

.payment-donut__center-label {
    fill: #8ea3c7;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.payment-donut__legend {
    display: grid;
    gap: 8px;
}

.payment-donut__legend-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.payment-donut__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.payment-donut__dot--cash {
    background: #f59e0b;
}

.payment-donut__dot--transfer {
    background: #22c55e;
}

.payment-donut__dot--nds {
    background: #38bdf8;
}

.payment-donut__name {
    color: #d9e7ff;
    white-space: nowrap;
}

.payment-donut__pct {
    color: #9fb0ca;
    font-weight: 700;
}

@media (max-width: 1280px) {
    .payment-donut {
        grid-template-columns: 108px 1fr;
        gap: 14px;
    }

    .payment-donut__svg {
        width: 108px;
        height: 108px;
        transform: scale(1.1);
        transform-origin: center center;
    }
}

.panel,
.content-card {
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.content-card {
    padding: 24px;
}

.content-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.content-card__header h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.02em;
    color: var(--text-strong);
}

.pill,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #dce7fb;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    vertical-align: middle;
}

.data-table th {
    color: #a7b6ca;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.data-table td {
    color: #d9e4f5;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

.data-table td strong {
    font-weight: 600;
    color: #eef4ff;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid transparent;
}

.status-pill--pending {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.18);
}

.status-pill--approved {
    color: #86efac;
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.18);
}

.status-pill--blocked {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.18);
}

.status-menu {
    position: relative;
    display: inline-block;
}

.status-menu summary {
    cursor: pointer;
    list-style: none;
}

.status-menu summary::-webkit-details-marker {
    display: none;
}

.status-menu[open] .status-menu__items {
    display: block;
}

.status-menu__items {
    display: none;
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    left: 0;
    min-width: 178px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: #0f172a;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.status-menu__items form {
    margin: 0;
}

.status-menu__btn {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 9px 10px;
    background: transparent;
    color: #dbe7ff;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.status-menu__btn:hover {
    background: rgba(96, 165, 250, 0.12);
}

.table-wrap {
    overflow: auto;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(8, 15, 29, 0.34);
}

.table-scroll-shell {
    position: relative;
}

.table-scroll-button {
    position: absolute;
    top: calc(50% + 10px);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 54px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0;
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.16), rgba(15, 23, 42, 0.48));
    color: #f8fafc;
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.18);
    cursor: pointer;
    opacity: 0.72;
    transform: translateY(-50%);
    transition: opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.table-scroll-button[hidden] {
    display: none;
}

.table-scroll-button svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
    filter: drop-shadow(0 1px 2px rgba(2, 6, 23, 0.85));
    flex: 0 0 auto;
}

.table-scroll-button:hover {
    border-color: rgba(125, 211, 252, 0.32);
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.24), rgba(30, 41, 59, 0.62));
    opacity: 1;
    transform: translateY(-50%);
}

.table-scroll-button--prev {
    left: 2px;
}

.table-scroll-button--next {
    right: 2px;
}

@media (max-width: 779px) {
    .table-scroll-button {
        width: 10px;
        height: 48px;
    }
}

.section {
    display: grid;
    gap: 16px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.section-title {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 22px;
    align-items: end;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.input,
.select,
.search-box input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    outline: none;
}

.input:focus,
.select:focus,
.search-box input:focus {
    border-color: rgba(79, 124, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
}

.search-box {
    max-width: 360px;
}

.info-list {
    display: grid;
    gap: 14px;
}

.info-list__item,
.activity-item,
.insight-item,
.action-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.10);
}

.action-card {
    display: block;
    text-decoration: none;
}

.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

@media (max-width: 1320px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

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

    .main-content {
        padding: 18px;
    }
}

@media (max-width: 720px) {
    .topbar,
    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .topbar__actions {
        width: 100%;
        flex-wrap: wrap;
    }
}


/* === admins page / modal === */
.modal-backdrop[hidden] {
    display: none !important;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(6px);
}

.modal-dialog {
    width: 100%;
    max-width: 560px;
}

.modal-dialog--wide {
    max-width: 860px;
}

.modal-card {
    background: var(--panel-strong);
    border: 1px solid var(--stroke-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.5);
    overflow: hidden;
}

.modal-card__header,
.modal-card__footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
}

.modal-card__header {
    border-bottom: 1px solid var(--stroke);
}

.modal-card__body {
    padding: 24px;
}

.modal-card__header h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    color: var(--text-strong);
}

.modal-close {
    width: 42px;
    height: 42px;
    border: 1px solid var(--stroke-strong);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
    font-size: 26px;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(79, 124, 255, 0.12);
    border-color: rgba(79, 124, 255, 0.24);
}

#demo-readonly-modal.demo-readonly-modal {
    z-index: 2147483000;
}

.demo-readonly-modal .modal-card {
    border-color: rgba(245, 158, 11, 0.42);
}

.demo-readonly-modal__subtitle,
.demo-readonly-modal__text {
    margin: 0;
    color: var(--muted);
}

.demo-readonly-modal__text {
    font-size: 16px;
    line-height: 1.6;
}

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

.form-group--full {
    grid-column: 1 / -1;
}

.admin-form-grid .form-group {
    margin-bottom: 0;
}

.admin-form-grid input,
.admin-form-grid select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--stroke-strong);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    outline: none;
}

.admin-form-grid input:focus,
.admin-form-grid select:focus {
    border-color: rgba(79, 124, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
}

.form-actions-line {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.modal-card__footer {
    border-top: 1px solid var(--stroke);
    justify-content: flex-end;
}

.modal-card__footer .btn {
    min-width: 170px;
}

@media (max-width: 820px) {
    .modal-backdrop {
        padding: 16px;
    }

    .modal-card__header,
    .modal-card__body,
    .modal-card__footer {
        padding: 18px;
    }

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

    .modal-card__footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .modal-card__footer .btn {
        width: 100%;
    }
}
