/* =========================================================================
   Мои сайты — единый стиль для кабинета и админ-панели
   ========================================================================= */

:root {
    --bg: #0e1016;
    --bg-elevated: #12151d;
    --card: #171a23;
    --card-hover: #1c2130;
    --border: #272c3a;
    --border-strong: #343b4d;
    --text: #eef1f7;
    --text-soft: #c3c9d6;
    --muted: #8d95a8;
    --muted-2: #6f788c;
    --accent: #6c8cff;
    --accent-2: #a86cff;
    --accent-soft: rgba(108, 140, 255, .14);
    --green: #46d9a0;
    --green-soft: rgba(70, 217, 160, .13);
    --amber: #f4bd62;
    --amber-soft: rgba(244, 189, 98, .13);
    --red: #ff7b88;
    --red-soft: rgba(255, 123, 136, .12);
    --blue: #71b7ff;
    --blue-soft: rgba(113, 183, 255, .13);
    --purple: #c19bff;
    --purple-soft: rgba(193, 155, 255, .14);
    --cyan: #63e1e8;
    --cyan-soft: rgba(99, 225, 232, .12);
    --radius: 20px;
    --radius-sm: 13px;
    --shadow: 0 24px 70px rgba(0, 0, 0, .42);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.app-body,
body.admin-body {
    background:
        radial-gradient(900px 520px at 12% -10%, rgba(108, 140, 255, .16), transparent 62%),
        radial-gradient(760px 480px at 92% 0%, rgba(168, 108, 255, .12), transparent 62%),
        var(--bg);
    background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: rgba(108, 140, 255, .35); color: #fff; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

h1, h2, h3, p { margin-top: 0; }
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .88em;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .06);
}

/* ------------------------------ Бренд ------------------------------ */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 24px rgba(108, 140, 255, .28);
}

.brand-mark svg { width: 22px; height: 22px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.brand-text small { font-size: 11.5px; color: var(--muted); margin-top: 3px; letter-spacing: .02em; }
.brand-sm .brand-mark { width: 38px; height: 38px; flex-basis: 38px; border-radius: 11px; }
.brand-sm .brand-mark svg { width: 19px; height: 19px; }
.brand-sm .brand-text strong { font-size: 15px; }

.eyebrow {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.text-gradient {
    background: linear-gradient(120deg, #8aa2ff 10%, #c29bff 60%, #ff9ecb 110%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ------------------------------ Кнопки ------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, filter .16s ease;
}
.btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.btn:active { transform: scale(.98); }

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 26px rgba(108, 140, 255, .24);
}
.btn-primary:hover { filter: brightness(1.09); }

.btn-ghost {
    color: var(--text-soft);
    background: rgba(255, 255, 255, .035);
    border-color: var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .07); border-color: var(--border-strong); color: var(--text); }

.btn-block { width: 100%; }
.btn-lg { min-height: 50px; border-radius: 13px; font-size: 15px; }
.btn-sm { min-height: 36px; padding: 8px 13px; font-size: 13px; border-radius: 9px; }

.btn-logout { color: var(--muted); }
.btn-logout:hover { color: var(--red); border-color: rgba(255, 123, 136, .3); background: var(--red-soft); }

.btn-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, .03);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: .15s ease;
}
.btn-mini:hover { color: #fff; background: rgba(255, 255, 255, .08); border-color: var(--border-strong); }
.btn-danger { color: #ffb3ba; border-color: rgba(255, 123, 136, .22); background: rgba(255, 123, 136, .07); }
.btn-danger:hover { color: #fff; background: rgba(255, 123, 136, .2); border-color: rgba(255, 123, 136, .4); }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, .03);
}
.icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.icon-btn svg { width: 21px; height: 21px; }

/* ------------------------------ Поля ------------------------------ */

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 650; color: var(--text-soft); letter-spacing: .01em; }
.req { color: var(--accent); }

.field input,
.field select,
.field textarea,
.input-wrap {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    color: var(--text);
    background: #0f1219;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.field textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
.field select { appearance: none; cursor: pointer; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%238d95a8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }
.field input:hover,
.field select:hover,
.field textarea:hover,
.input-wrap:hover { border-color: var(--border-strong); }
.field input:focus,
.field select:focus,
.field textarea:focus,
.input-wrap:focus-within {
    border-color: rgba(108, 140, 255, .7);
    box-shadow: 0 0 0 4px rgba(108, 140, 255, .12);
    background: #10141d;
}
.field-hint { font-size: 11.5px; color: var(--muted-2); line-height: 1.45; }

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0;
}
.input-wrap input {
    min-height: 48px;
    padding: 10px 46px;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.input-wrap input:focus { box-shadow: none; background: transparent; }
.input-icon {
    position: absolute;
    left: 15px;
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
}
.input-action {
    position: absolute;
    right: 7px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
}
.input-action:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.input-action .eye { width: 19px; height: 19px; }
.input-action .eye-off { display: none; }
.input-action.is-visible .eye-open { display: none; }
.input-action.is-visible .eye-off { display: block; }

.field-password .field-label { margin-bottom: 1px; }

.caps-hint {
    margin: -2px 0 0;
    padding: 8px 11px;
    border-radius: 9px;
    color: var(--amber);
    background: var(--amber-soft);
    font-size: 12px;
    font-weight: 600;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .02);
    cursor: pointer;
}
.checkbox-row input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: 0 0 18px;
    accent-color: var(--accent);
}
.checkbox-row span { display: flex; flex-direction: column; gap: 3px; }
.checkbox-row strong { font-size: 13.5px; font-weight: 650; }
.checkbox-row small { color: var(--muted); font-size: 12px; }

/* ------------------------------ Уведомления ------------------------------ */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 12px 14px;
    margin: 0 0 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-soft);
    background: rgba(255, 255, 255, .03);
    transition: opacity .2s ease, transform .2s ease;
}
.alert.is-leaving { opacity: 0; transform: translateY(-5px); }
.alert-icon {
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    margin-top: 1px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    background: rgba(255, 255, 255, .08);
}
.alert-error { color: #ffc3c9; border-color: rgba(255, 123, 136, .28); background: var(--red-soft); }
.alert-error .alert-icon { color: #2b0b0f; background: var(--red); }
.alert-success { color: #b6f5dc; border-color: rgba(70, 217, 160, .26); background: var(--green-soft); }
.alert-success .alert-icon { color: #06251a; background: var(--green); }
.alert-warning { color: #ffe3b0; border-color: rgba(244, 189, 98, .28); background: var(--amber-soft); }
.alert-warning .alert-icon { color: #2d1b02; background: var(--amber); }
.alert-info { color: #c9e4ff; border-color: rgba(113, 183, 255, .28); background: var(--blue-soft); }
.alert-info .alert-icon { color: #061b2e; background: var(--blue); }
.alert-list { margin: 6px 0 0; padding-left: 18px; }
.alert-list li { margin: 2px 0; }
.alert-dismissible { align-items: center; }
.alert-close {
    margin-left: auto;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 0;
    border-radius: 7px;
    color: inherit;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    opacity: .65;
}
.alert-close:hover { opacity: 1; background: rgba(255, 255, 255, .08); }

/* =========================================================================
   Страницы входа
   ========================================================================= */

.auth-body {
    background:
        radial-gradient(1000px 600px at 0% 0%, rgba(108, 140, 255, .16), transparent 60%),
        radial-gradient(900px 620px at 100% 100%, rgba(168, 108, 255, .13), transparent 60%),
        var(--bg);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
    min-height: 100vh;
}

.auth-visual {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px clamp(36px, 5vw, 76px);
    background:
        radial-gradient(700px 460px at 18% 12%, rgba(108, 140, 255, .26), transparent 62%),
        radial-gradient(700px 480px at 84% 74%, rgba(168, 108, 255, .22), transparent 64%),
        linear-gradient(155deg, #10131d 0%, #0d1018 55%, #111322 100%);
    border-right: 1px solid var(--border);
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at 35% 40%, #000 10%, transparent 72%);
    pointer-events: none;
}

.auth-visual::after {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    right: -170px;
    top: 38%;
    border-radius: 50%;
    border: 1px solid rgba(138, 162, 255, .16);
    box-shadow:
        0 0 0 60px rgba(138, 162, 255, .035),
        0 0 0 120px rgba(168, 108, 255, .025);
    pointer-events: none;
}

.auth-brand { position: relative; z-index: 2; }

.auth-visual-content {
    position: relative;
    z-index: 2;
    max-width: 560px;
    padding: 48px 0;
}

.auth-visual-content h1 {
    margin: 0 0 20px;
    font-size: clamp(34px, 4.3vw, 57px);
    line-height: 1.05;
    letter-spacing: -.035em;
    font-weight: 750;
}

.auth-visual-content > p {
    max-width: 470px;
    margin: 0 0 34px;
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.72;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 430px;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
    backdrop-filter: blur(8px);
}
.auth-features li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.auth-features strong { font-size: 13.5px; font-weight: 650; }
.auth-features small { color: var(--muted); font-size: 12px; }
.feature-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    font-size: 17px;
    background: rgba(108, 140, 255, .14);
}

.auth-visual-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 12.5px;
}
.pulse-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(70, 217, 160, .1);
}
.pulse-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(70, 217, 160, .45);
    animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
    0% { transform: scale(.6); opacity: .9; }
    80%, 100% { transform: scale(1.7); opacity: 0; }
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 44px 32px 28px;
    background:
        radial-gradient(600px 400px at 80% 0%, rgba(168, 108, 255, .08), transparent 65%),
        var(--bg);
}

.auth-card {
    width: min(430px, 100%);
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(23, 26, 35, .84);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.auth-card-head { margin-bottom: 24px; }
.auth-card-head h2 {
    margin: 16px 0 8px;
    font-size: 28px;
    letter-spacing: -.025em;
}
.auth-card-head p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

.pill-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border: 1px solid rgba(108, 140, 255, .24);
    border-radius: 999px;
    color: #b9c6ff;
    background: rgba(108, 140, 255, .1);
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(108, 140, 255, .16); }
.pill-label-admin { color: #e0ceff; border-color: rgba(193, 155, 255, .25); background: rgba(193, 155, 255, .1); }
.pill-label-admin .pill-dot { background: var(--purple); box-shadow: 0 0 0 3px rgba(193, 155, 255, .16); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 20px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--muted-2);
    font-size: 11.5px;
    line-height: 1.55;
}
.auth-note svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }

.auth-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    color: var(--muted-2);
    font-size: 11.5px;
    text-align: center;
}

.auth-mobile-brand { display: none; }

/* Админский вход */

.admin-auth-body { display: grid; place-items: center; }
.admin-auth-shell {
    width: min(460px, 100%);
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}
.admin-auth-brand { margin-bottom: 2px; }
.admin-auth-card { width: 100%; }
.admin-auth-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    padding-top: 17px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted-2);
}
.admin-auth-links a { color: var(--muted); text-decoration: none; }
.admin-auth-links a:hover { color: var(--text); }
.admin-auth-footer { margin-top: 0; }

/* =========================================================================
   Основной кабинет
   ========================================================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(39, 44, 58, .8);
    background: rgba(14, 16, 22, .82);
    backdrop-filter: blur(16px);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1240px;
    min-height: 72px;
    margin: 0 auto;
    padding: 0 28px;
}

.topbar-actions { display: flex; align-items: center; gap: 13px; }

.session-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, .03);
    font-size: 11.5px;
    white-space: nowrap;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.session-pill strong {
    color: var(--text-soft);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}
.session-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(70, 217, 160, .12);
    transition: background .2s ease, box-shadow .2s ease;
}
.session-pill.is-warning { color: #ffd794; border-color: rgba(244, 189, 98, .35); background: var(--amber-soft); }
.session-pill.is-warning .session-dot { background: var(--amber); box-shadow: 0 0 0 3px rgba(244, 189, 98, .14); }
.session-pill.is-warning strong { color: var(--amber); }
.session-pill.is-critical { color: #ffb8c0; border-color: rgba(255, 123, 136, .42); background: var(--red-soft); }
.session-pill.is-critical .session-dot { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 123, 136, .14); animation: blink 1s steps(2) infinite; }
.session-pill.is-critical strong { color: var(--red); }

@keyframes blink { 50% { opacity: .35; } }

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.avatar {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    border-radius: 50%;
    color: #fff;
    font-size: 12.5px;
    font-weight: 750;
    letter-spacing: .02em;
    background: linear-gradient(135deg, rgba(108, 140, 255, .95), rgba(168, 108, 255, .92));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.avatar-sm { width: 33px; height: 33px; flex-basis: 33px; font-size: 11.5px; }
.user-chip-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-chip-text strong { font-size: 13px; font-weight: 650; white-space: nowrap; }
.user-chip-text small {
    font-size: 10.5px;
    color: var(--muted-2);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 28px 30px;
}

.hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 34px;
}
.hero-copy { max-width: 720px; }
.hero-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(31px, 4.2vw, 46px);
    line-height: 1.08;
    letter-spacing: -.035em;
}
.hero-copy p { margin: 0; color: var(--muted); font-size: 15px; }
.hero-stats { display: flex; gap: 10px; flex: 0 0 auto; }
.stat-tile {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 150px;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, .025);
}
.stat-tile div { display: flex; flex-direction: column; line-height: 1.2; }
.stat-tile strong { font-size: 19px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-tile small { font-size: 10.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.stat-icon { font-size: 19px; }

.search-panel {
    margin-bottom: 25px;
    padding: 14px 16px 12px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .018));
    box-shadow: 0 16px 40px rgba(0, 0, 0, .13);
}
.search-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 6px 0 4px;
}
.search-icon { width: 21px; height: 21px; flex: 0 0 21px; color: var(--muted); }
.search-field input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-size: 15px;
}
.search-field input::placeholder { color: var(--muted-2); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-clear {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, .04);
    font-size: 17px;
    line-height: 1;
}
.search-clear:hover { color: var(--text); background: rgba(255, 255, 255, .09); }
.search-kbd {
    display: inline-grid;
    place-items: center;
    min-width: 25px;
    height: 25px;
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted-2);
    background: rgba(255, 255, 255, .03);
    font-family: var(--font);
    font-size: 11px;
}
.search-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 6px 0;
    margin-top: 8px;
    border-top: 1px solid rgba(39, 44, 58, .55);
    color: var(--muted-2);
    font-size: 11.5px;
}
.search-hint { color: var(--muted-2); }

.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 18px;
}

.site-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 13px;
    min-height: 218px;
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    overflow: hidden;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.site-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
    opacity: 0;
    transition: opacity .18s ease;
}
.site-card:hover {
    transform: translateY(-4px);
    border-color: #394158;
    background: var(--card-hover);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .24);
}
.site-card:hover::before { opacity: 1; }
.site-card-head { display: flex; align-items: flex-start; justify-content: space-between; }
.site-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(108, 140, 255, .16), rgba(168, 108, 255, .11));
    border: 1px solid rgba(108, 140, 255, .14);
    overflow: hidden;
}
.site-icon-emoji { font-size: 26px; line-height: 1; }
.site-icon-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.site-icon-sm { width: 39px; height: 39px; flex-basis: 39px; border-radius: 11px; }
.site-icon-sm .site-icon-emoji { font-size: 19px; }
.site-open-hint {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border-radius: 8px;
    color: var(--muted-2);
    background: rgba(255, 255, 255, .03);
    transition: .18s ease;
}
.site-open-hint svg { width: 16px; height: 16px; }
.site-card:hover .site-open-hint { color: #fff; background: rgba(108, 140, 255, .18); transform: translate(1px, -1px); }
.site-title { margin: 1px 0 0; font-size: 18px; line-height: 1.3; letter-spacing: -.015em; }
.site-desc { margin: 0; flex: 1; color: var(--muted); font-size: 13px; line-height: 1.58; }
.site-desc-empty { font-style: italic; color: var(--muted-2); }
.site-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 15px;
    margin-top: auto;
    border-top: 1px solid rgba(39, 44, 58, .7);
}
.site-host {
    color: var(--muted-2);
    font-size: 11px;
    max-width: 52%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.go-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border-radius: 9px;
    color: #eef1ff;
    background: linear-gradient(135deg, rgba(108, 140, 255, .2), rgba(168, 108, 255, .2));
    border: 1px solid rgba(108, 140, 255, .24);
    font-size: 12.5px;
    font-weight: 650;
    text-decoration: none;
    transition: .18s ease;
}
.go-link svg { width: 15px; height: 15px; transition: transform .18s ease; }
.go-link:hover { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.go-link:hover svg { transform: translateX(2px); }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 52px 24px;
    margin-top: 16px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    text-align: center;
    background: rgba(255, 255, 255, .015);
}
.empty-state h2, .empty-state h3 { margin: 8px 0 0; font-size: 20px; letter-spacing: -.015em; }
.empty-state p { max-width: 430px; margin: 0; color: var(--muted); font-size: 13.5px; }
.empty-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 2px;
    border-radius: 17px;
    font-size: 27px;
    background: rgba(108, 140, 255, .1);
    border: 1px solid rgba(108, 140, 255, .14);
}
.empty-state .btn { margin-top: 12px; }
.empty-compact { padding: 34px 20px; margin-top: 0; border: 0; background: transparent; }

.site-footer {
    max-width: 1240px;
    margin: 22px auto 0;
    padding: 22px 28px 30px;
    border-top: 1px solid rgba(39, 44, 58, .55);
    color: var(--muted-2);
    font-size: 11.5px;
}
.site-footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }

/* =========================================================================
   Админ-панель
   ========================================================================= */

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    width: 264px;
    padding: 25px 18px 20px;
    background: rgba(16, 19, 27, .94);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(16px);
}
.admin-brand { padding: 0 8px 24px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-caption {
    padding: 12px 10px 7px;
    font-size: 9.5px;
    font-weight: 750;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted-2);
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 550;
    text-decoration: none;
    transition: .16s ease;
}
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .045); }
.nav-item.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(108, 140, 255, .18), rgba(168, 108, 255, .06));
    border-color: rgba(108, 140, 255, .22);
}
.nav-item.is-active .nav-icon { background: rgba(108, 140, 255, .2); }
.nav-icon {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    border-radius: 8px;
    font-size: 15px;
    background: rgba(255, 255, 255, .04);
}
.nav-arrow { margin-left: auto; color: var(--muted-2); font-size: 12px; opacity: 0; transition: .16s ease; }
.nav-item:hover .nav-arrow, .nav-item.is-active .nav-arrow { opacity: 1; }

.sidebar-note {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .022);
}
.sidebar-note-label { font-size: 9.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted-2); }
.sidebar-note strong { font-size: 13px; }
.sidebar-note small { font-size: 10.5px; color: var(--muted-2); word-break: break-word; }
.sidebar-actions { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
}
.sidebar-link:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.sidebar-link-danger:hover { color: var(--red); background: var(--red-soft); }

.admin-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(4, 6, 10, .66);
    backdrop-filter: blur(3px);
}

.admin-main {
    flex: 1;
    min-width: 0;
    margin-left: 264px;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 81px;
    padding: 15px 32px;
    border-bottom: 1px solid rgba(39, 44, 58, .8);
    background: rgba(14, 16, 22, .82);
    backdrop-filter: blur(16px);
}
.menu-toggle { display: none; }
.admin-title { min-width: 0; }
.admin-title h1 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.admin-title p { margin: 3px 0 0; color: var(--muted); font-size: 11.5px; }
.admin-topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.admin-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.admin-content {
    max-width: 1320px;
    margin: 0 auto;
    padding: 30px 32px 48px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 29px;
}
.mini-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(255, 255, 255, .025);
}
.mini-stat-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    font-size: 17px;
    background: rgba(108, 140, 255, .1);
    border: 1px solid rgba(108, 140, 255, .1);
}
.mini-stat div { display: flex; flex-direction: column; line-height: 1.18; min-width: 0; }
.mini-stat strong { font-size: 18px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-stat small { margin-top: 3px; color: var(--muted); font-size: 10.5px; }

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}
.page-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.015em; }
.page-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; }
.heading-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.panel {
    margin-bottom: 22px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(23, 26, 35, .78);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .12);
}
.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 19px;
}
.panel-head h2 { margin: 0; font-size: 17px; letter-spacing: -.015em; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; }
.panel-head .btn { flex: 0 0 auto; }
.editor-panel { border-color: rgba(108, 140, 255, .25); box-shadow: 0 18px 50px rgba(0, 0, 0, .18); }

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 17px;
}
.field-span-2 { grid-column: 1 / -1; }
.field-narrow { max-width: 220px; }
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding-top: 7px;
}

.icon-input-row { display: flex; align-items: center; gap: 10px; }
.icon-preview {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 23px;
    background: rgba(255, 255, 255, .03);
    overflow: hidden;
}
.icon-preview .site-icon-img { width: 100%; height: 100%; object-fit: cover; }

.file-input {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    border: 1px dashed var(--border-strong);
    border-radius: 11px;
    overflow: hidden;
    background: rgba(255, 255, 255, .015);
}
.file-input input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}
.file-input-face {
    padding: 10px 13px;
    color: var(--muted);
    font-size: 12.5px;
    pointer-events: none;
}

.table-wrap { width: 100%; overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.data-table thead th {
    padding: 0 12px 11px;
    border-bottom: 1px solid var(--border);
    color: var(--muted-2);
    font-size: 9.5px;
    font-weight: 750;
    letter-spacing: .11em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.data-table tbody td {
    padding: 12px;
    border-bottom: 1px solid rgba(39, 44, 58, .55);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .14s ease; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .018); }
.data-table tbody tr.is-editing { background: rgba(108, 140, 255, .055); }
.cell-actions { text-align: right; }
.data-table th.cell-actions { text-align: right; }

.table-site { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.table-site-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.table-site-text strong { font-size: 13px; font-weight: 650; }
.table-site-text small {
    max-width: 270px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted-2);
    font-size: 10.5px;
}
.url-link { color: var(--blue); text-decoration: none; font-size: 12px; white-space: nowrap; }
.url-link:hover { text-decoration: underline; }
.url-full {
    display: block;
    max-width: 230px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted-2);
    font-size: 10px;
}
.order-chip {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 25px;
    padding: 0 7px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--muted);
    background: rgba(255, 255, 255, .025);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 650;
    white-space: nowrap;
}
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-on { color: var(--green); border-color: rgba(70, 217, 160, .22); background: var(--green-soft); }
.status-off { color: var(--muted); border-color: var(--border); background: rgba(255, 255, 255, .025); }
.status-off .status-dot { background: var(--muted); }

.row-actions { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.inline-form { display: inline-flex; margin: 0; }

.user-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.user-cell div { display: flex; flex-direction: column; line-height: 1.3; }
.user-cell strong { font-size: 13px; font-weight: 600; }
.user-cell small { color: var(--muted-2); font-size: 10px; }
.muted { color: var(--muted); }

.panel-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 17px;
    padding: 12px 14px;
    border: 1px solid rgba(39, 44, 58, .8);
    border-radius: 11px;
    background: rgba(255, 255, 255, .018);
    color: var(--muted-2);
    font-size: 11px;
    line-height: 1.55;
}
.panel-note p { margin: 0; }

/* Фильтры журнала */

.filter-panel { padding-bottom: 18px; }
.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}
.filter-grid .field input,
.filter-grid .field select { min-height: 40px; font-size: 12.5px; }
.field-search { grid-column: span 2; }
.filter-actions { display: flex; gap: 8px; }
.filter-actions .btn { min-height: 40px; }

.logs-table .log-time { color: var(--text-soft); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-user { display: block; font-weight: 600; white-space: nowrap; }
.log-id { color: var(--muted-2); font-size: 9.5px; }
.log-details { color: var(--muted); font-size: 11.5px; line-height: 1.5; word-break: break-word; }
.logs-table td:nth-child(1) { white-space: nowrap; }
.logs-table td:nth-child(4) { min-width: 260px; max-width: 480px; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-green { color: var(--green); border-color: rgba(70, 217, 160, .22); background: var(--green-soft); }
.badge-gray { color: var(--muted); border-color: var(--border); background: rgba(255, 255, 255, .03); }
.badge-blue { color: var(--blue); border-color: rgba(113, 183, 255, .22); background: var(--blue-soft); }
.badge-red { color: var(--red); border-color: rgba(255, 123, 136, .22); background: var(--red-soft); }
.badge-purple { color: var(--purple); border-color: rgba(193, 155, 255, .24); background: var(--purple-soft); }
.badge-amber { color: var(--amber); border-color: rgba(244, 189, 98, .24); background: var(--amber-soft); }
.badge-cyan { color: var(--cyan); border-color: rgba(99, 225, 232, .24); background: var(--cyan-soft); }
.badge-neutral { color: var(--text-soft); border-color: var(--border); background: rgba(255, 255, 255, .03); }

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 17px;
    margin-top: 5px;
    border-top: 1px solid rgba(39, 44, 58, .6);
    font-size: 11px;
}
.pagination { display: flex; flex-wrap: wrap; gap: 4px; }
.page-btn {
    display: inline-grid;
    place-items: center;
    min-width: 31px;
    height: 31px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, .025);
    font-size: 11.5px;
    text-decoration: none;
}
.page-btn:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.page-btn.is-current { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.page-gap { display: inline-grid; place-items: center; min-width: 18px; color: var(--muted-2); }

/* =========================================================================
   Адаптивность
   ========================================================================= */

@media (max-width: 1100px) {
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-stats .stat-tile:last-child { display: none; }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .field-search { grid-column: span 2; }
}

@media (max-width: 980px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-panel { padding: 34px 20px 24px; }
    .auth-mobile-brand { display: inline-flex; margin-bottom: 2px; }
    .auth-card { width: min(440px, 100%); }
}

@media (max-width: 900px) {
    .admin-sidebar {
        transform: translateX(-104%);
        transition: transform .22s ease;
        box-shadow: 22px 0 60px rgba(0, 0, 0, .4);
    }
    body.nav-open .admin-sidebar { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .menu-toggle { display: inline-grid; }
    .admin-topbar { padding: 13px 20px; }
    .admin-content { padding: 24px 20px 40px; }
    .admin-overlay:not([hidden]) { display: block; }
}

/* На узких экранах широкие таблицы админки превращаются в карточки. */
@media (max-width: 1240px) {
    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td { display: block; width: 100%; }
    .data-table thead { display: none; }
    .data-table tbody tr {
        margin-bottom: 12px;
        padding: 13px 14px;
        border: 1px solid var(--border);
        border-radius: 13px;
        background: rgba(255, 255, 255, .018);
    }
    .data-table tbody tr:hover { background: rgba(255, 255, 255, .018); }
    .data-table tbody td {
        display: grid;
        grid-template-columns: 98px minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 6px 0;
        border: 0;
        text-align: left;
    }
    .data-table tbody td::before {
        content: attr(data-label);
        grid-column: 1;
        padding-top: 2px;
        color: var(--muted-2);
        font-size: 9px;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
    .data-table tbody td > * {
        grid-column: 2;
        justify-self: start;
        min-width: 0;
        max-width: 100%;
    }
    .data-table tbody td.cell-actions { display: block; padding-top: 10px; }
    .data-table tbody td.cell-actions::before { display: block; margin-bottom: 7px; }
    .row-actions { justify-content: flex-start; }
    .table-site { min-width: 0; }
    .table-site-text small { max-width: 100%; white-space: normal; }
    .url-full { max-width: 100%; }
    .logs-table td:nth-child(4) { min-width: 0; }
    .logs-table td:nth-child(1) { white-space: normal; }
    .table-footer { flex-direction: column; align-items: flex-start; }
    .pagination { width: 100%; }
}

@media (max-width: 760px) {
    .topbar-inner { min-height: 64px; padding: 0 16px; gap: 10px; }
    .topbar-actions { gap: 8px; }
    .user-chip-text { display: none; }
    .btn-logout .btn-label { display: none; }
    .btn-logout { min-width: 38px; min-height: 38px; padding: 0; border-radius: 10px; }
    .btn-logout span { display: none; }
    .session-label { display: none; }
    .session-pill { padding: 0 10px; gap: 6px; }
    .page-wrap { padding: 31px 16px 22px; }
    .hero { flex-direction: column; align-items: flex-start; gap: 19px; margin-bottom: 25px; }
    .hero-stats { width: 100%; }
    .hero-stats .stat-tile { flex: 1; min-width: 0; }
    .hero-stats .stat-tile:last-child { display: flex; }
    .site-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 13px; }
    .site-card { min-height: 200px; padding: 18px; }
    .site-footer { padding: 18px 16px 25px; }
    .site-footer-inner { justify-content: center; text-align: center; }
    .search-kbd { display: none; }
    .search-panel { padding: 10px 12px; }
    .search-hint { display: none; }
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .mini-stat { padding: 12px; gap: 9px; }
    .mini-stat-icon { width: 32px; height: 32px; flex-basis: 32px; font-size: 15px; }
    .mini-stat strong { font-size: 16px; }
    .admin-topbar-right .admin-chip { display: none; }
    .admin-title h1 { font-size: 18px; }
    .admin-title p { display: none; }
    .panel { padding: 16px; border-radius: 16px; }
    .panel-head { flex-direction: column; gap: 10px; }
    .page-heading { flex-direction: column; align-items: flex-start; gap: 12px; }
    .form-grid { grid-template-columns: 1fr; gap: 14px; }
    .field-span-2 { grid-column: auto; }
    .field-narrow { max-width: none; }
    .filter-grid { grid-template-columns: 1fr; }
    .field-search { grid-column: auto; }
    .filter-actions .btn { width: 100%; }
}

@media (max-width: 520px) {
    .auth-card { padding: 26px 20px; border-radius: 19px; }
    .auth-card-head h2 { font-size: 24px; }
    .auth-panel { padding: 25px 14px 18px; }
    .auth-features { display: none; }
    .hero-copy h1 { font-size: 31px; }
    .hero-stats .stat-tile:last-child { display: none; }
    .site-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr; }
    .session-pill strong { font-size: 11px; }
    .admin-topbar { padding: 11px 14px; }
    .admin-content { padding: 18px 13px 32px; }
    .panel { padding: 14px; }
    .data-table tbody td { grid-template-columns: 86px minmax(0, 1fr); }
    .admin-auth-links { flex-direction: column; align-items: flex-start; }
}

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