/* =========================================================
   Altairika Design System — Statistics Dashboard
   Adapted from Altairika Brandbook (palette, typography, UI).
   ========================================================= */

@font-face {
    font-family: "Asgard";
    src: url("../fonts/altairika/Asgard-FitXbold.ttf") format("truetype");
    font-weight: 900;
    font-display: swap;
}

@font-face {
    font-family: "Onest";
    src: url("../fonts/altairika/Onest-VariableFont_wght.ttf") format("truetype-variations"),
         url("../fonts/altairika/Onest-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Tiny5";
    src: url("../fonts/altairika/Tiny5-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
    --violet: #8418FE;
    --violet-50: #EDD6FF;
    --violet-100: #CB9EFF;
    --violet-200: #B97EFF;
    --violet-300: #9E48FF;
    --violet-500: #7000D2;
    --violet-soft: rgba(132, 24, 254, 0.10);

    --lilac: #AD00D8;
    --lilac-50: #F5D8FF;
    --crimson: #FF2D59;
    --crimson-50: #FFD6F4;
    --orange: #FF6D00;
    --orange-50: #FFD4AA;
    --yellow: #FFA502;
    --yellow-50: #FFEFDD;

    --ink: #181614;
    --ink-80: rgba(24, 22, 20, 0.80);
    --ink-60: rgba(24, 22, 20, 0.60);
    --ink-40: rgba(24, 22, 20, 0.40);
    --ink-20: rgba(24, 22, 20, 0.20);
    --ink-15: rgba(24, 22, 20, 0.15);
    --ink-10: rgba(24, 22, 20, 0.10);
    --ink-08: rgba(24, 22, 20, 0.08);

    --paper: #FAFAFA;
    --paper-2: #EDEFF4;
    --paper-3: #E2E5EE;
    --grey-200: #CDD3DF;
    --grey-300: #B5BBC8;
    --grey-400: #7E838D;
    --grey-500: #515763;

    --white: #FFFFFF;

    --shadow-card: 0 1px 0 rgba(24, 22, 20, 0.04);
    --shadow-pop: 0 12px 32px rgba(24, 22, 20, 0.10);
}

/* ---------- Reset & base ---------- */
.atk-scope,
.atk-scope * {
    box-sizing: border-box;
}

body.atk-body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Onest", system-ui, -apple-system, sans-serif;
    font-feature-settings: "ss01", "ss02";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.45;
}

/* ---------- Top chrome (header) ---------- */
.atk-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
}

.atk-header__inner {
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px 32px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}

.atk-header__panel {
    display: contents;
}

.atk-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--ink);
}

.atk-brand__logo {
    height: 28px;
    width: auto;
    display: block;
}

.atk-brand__logo path:first-child { fill: var(--lilac) !important; }
.atk-brand__logo path:not(:first-child) { fill: var(--ink) !important; }

.atk-brand__sep {
    width: 1px;
    height: 24px;
    background: var(--ink-15);
}

.atk-brand__desc {
    font-family: "Tiny5", monospace;
    font-size: 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-60);
    line-height: 1;
    white-space: nowrap;
}

.atk-brand__desc b {
    color: var(--ink);
    font-weight: 400;
    margin-left: 4px;
}

.atk-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.atk-nav__link {
    font-family: "Tiny5", monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    padding: 10px 14px 8px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: color .15s, border-color .15s, background .15s;
    line-height: 1;
    white-space: nowrap;
}

.atk-nav__link:hover {
    color: var(--ink);
    border-color: var(--ink-15);
    text-decoration: none;
}

.atk-nav__link.is-active {
    color: var(--violet);
    border-color: var(--violet);
    background: var(--violet-soft);
}

.atk-header__right {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-self: end;
}

.atk-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-60);
    padding: 8px 12px 6px;
    border: 1px solid var(--ink-15);
    line-height: 1;
}

.atk-user b {
    color: var(--ink);
    font-weight: 400;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.atk-lang {
    display: inline-flex;
    border: 1px solid var(--ink-15);
}

.atk-lang a {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-60);
    padding: 8px 10px 6px;
    text-decoration: none;
    line-height: 1;
}

.atk-lang a + a { border-left: 1px solid var(--ink-15); }
.atk-lang a:hover { color: var(--ink); }
.atk-lang a.is-active { background: var(--ink); color: var(--paper); }

.atk-btn-logout {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--violet);
    border: 1px solid var(--violet);
    background: transparent;
    padding: 8px 12px 6px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.atk-btn-logout:hover {
    background: var(--violet);
    color: var(--white);
    text-decoration: none;
}

/* ---------- Page container ---------- */
.atk-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 32px;
}

.atk-page__head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 24px;
    padding-bottom: 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--ink);
}

.atk-page__title {
    font-family: "Asgard", sans-serif;
    font-weight: 900;
    font-size: 64px;
    line-height: 0.92;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin: 0;
}

.atk-page__title em {
    font-style: normal;
    color: var(--violet);
}

.atk-eyebrow {
    font-family: "Tiny5", monospace;
    font-size: 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--violet);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    line-height: 1;
}

.atk-eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--violet);
    display: inline-block;
}

.atk-eyebrow.is-yellow { color: var(--yellow); }
.atk-eyebrow.is-yellow::before { background: var(--yellow); }
.atk-eyebrow.is-crimson { color: var(--crimson); }
.atk-eyebrow.is-crimson::before { background: var(--crimson); }
.atk-eyebrow.is-ink { color: var(--ink-60); }
.atk-eyebrow.is-ink::before { background: var(--ink-60); }

.atk-page__meta {
    text-align: right;
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    line-height: 1.5;
}

.atk-page__meta b { color: var(--ink); font-weight: 400; }

/* ---------- Cards ---------- */
.atk-card {
    background: var(--white);
    border: 1px solid var(--ink-15);
    padding: 28px 32px;
    position: relative;
}

.atk-card.is-paper { background: var(--paper-2); border-color: transparent; }
.atk-card.is-violet { background: var(--violet); border-color: var(--violet); color: var(--white); }
.atk-card.is-yellow { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.atk-card.is-crimson { background: var(--crimson); border-color: var(--crimson); color: var(--white); }
.atk-card.is-ink { background: var(--ink); border-color: var(--ink); color: var(--white); }
.atk-card.is-soft-violet { background: var(--violet-soft); border-color: var(--violet); }

.atk-card.is-tight { padding: 18px 22px; }

/* ---------- KPI block ---------- */
.atk-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.atk-kpi {
    background: var(--white);
    border: 1px solid var(--ink-15);
    padding: 22px 24px 20px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 14px;
    min-height: 168px;
    position: relative;
    overflow: hidden;
}

.atk-kpi__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.atk-kpi__label {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-60);
    line-height: 1.2;
}

.atk-kpi__icon {
    width: 22px;
    height: 22px;
    color: var(--ink-40);
    flex: none;
}

.atk-kpi__value {
    font-family: "Asgard", sans-serif;
    font-weight: 900;
    font-size: 64px;
    line-height: 0.9;
    letter-spacing: -0.02em;
    color: var(--ink);
    word-break: break-word;
}

.atk-kpi__hint {
    font-family: "Onest", sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: var(--ink-60);
}

.atk-kpi__hint b { color: var(--ink); font-weight: 600; }

.atk-kpi.is-text .atk-kpi__value {
    font-size: 32px;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.atk-kpi.is-violet .atk-kpi__value { color: var(--violet); }
.atk-kpi.is-violet .atk-kpi__icon { color: var(--violet); }

.atk-kpi.is-lilac .atk-kpi__value { color: var(--lilac); }
.atk-kpi.is-lilac .atk-kpi__icon { color: var(--lilac); }

.atk-kpi.is-yellow .atk-kpi__value { color: var(--yellow); }
.atk-kpi.is-yellow .atk-kpi__icon { color: var(--yellow); }

.atk-kpi.is-crimson .atk-kpi__value { color: var(--crimson); }
.atk-kpi.is-crimson .atk-kpi__icon { color: var(--crimson); }

.atk-kpi.is-mute .atk-kpi__value { color: var(--ink-40); }
.atk-kpi.is-mute .atk-kpi__icon { color: var(--ink-40); }

.atk-kpi.is-fill {
    background: var(--violet);
    border-color: var(--violet);
    color: var(--white);
}

.atk-kpi.is-fill .atk-kpi__label,
.atk-kpi.is-fill .atk-kpi__hint { color: rgba(255,255,255,0.7); }
.atk-kpi.is-fill .atk-kpi__hint b { color: var(--white); }
.atk-kpi.is-fill .atk-kpi__value { color: var(--white); }
.atk-kpi.is-fill .atk-kpi__icon { color: rgba(255,255,255,0.7); }

/* Compact KPI — used inside narrow sidebar (under filters card) */
.atk-kpi-grid.is-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 0;
}

.atk-kpi.is-compact {
    padding: 14px 14px 12px;
    gap: 8px;
    min-height: 0;
}

.atk-kpi.is-compact .atk-kpi__label {
    font-size: 10px;
    letter-spacing: 0.08em;
}

.atk-kpi.is-compact .atk-kpi__icon {
    width: 16px;
    height: 16px;
}

.atk-kpi.is-compact .atk-kpi__value {
    font-size: 24px;
    line-height: 1;
    letter-spacing: -0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
}

.atk-kpi.is-compact.is-text .atk-kpi__value {
    font-size: 16px;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.atk-kpi.is-compact .atk-kpi__hint {
    font-size: 11px;
    line-height: 1.3;
}

/* ---------- Chips ---------- */
.atk-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 6px;
    border: 1px solid var(--ink-15);
    background: var(--white);
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition: color .15s, border-color .15s, background .15s;
}

.atk-chip:hover {
    color: var(--ink);
    border-color: var(--ink-40);
    text-decoration: none;
}

.atk-chip.is-active {
    background: var(--violet);
    border-color: var(--violet);
    color: var(--white);
}

.atk-chip.is-violet { color: var(--violet); border-color: var(--violet); }
.atk-chip.is-violet:hover { background: var(--violet-soft); }

.atk-chip.is-yellow { color: var(--ink); border-color: var(--yellow); background: rgba(255,165,2,0.10); }
.atk-chip.is-crimson { color: var(--crimson); border-color: var(--crimson); }
.atk-chip.is-mute { color: var(--ink-40); border-color: var(--ink-15); pointer-events: none; }

.atk-chip .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
}

.atk-chip-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ---------- Filters card ---------- */
.atk-filters {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.atk-filters__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.atk-filters__label {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    line-height: 1;
}

.atk-filters__row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* native form controls reskin */
.atk-input,
.atk-select {
    font-family: "Onest", sans-serif;
    font-size: 14px;
    line-height: 1.2;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--ink-15);
    border-radius: 0;
    padding: 10px 12px;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .15s, box-shadow .15s;
}

.atk-input::placeholder { color: var(--ink-40); }

.atk-input:focus,
.atk-select:focus {
    outline: none;
    border-color: var(--violet);
    box-shadow: 0 0 0 3px var(--violet-soft);
}

.atk-select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23181614' d='M5 6L0 0h10z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 32px;
}

.atk-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Onest", sans-serif;
    font-size: 13px;
    color: var(--ink-80);
    cursor: pointer;
    user-select: none;
}

.atk-checkbox input { position: absolute; opacity: 0; pointer-events: none; }

.atk-checkbox__box {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--ink-40);
    background: var(--white);
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
}

.atk-checkbox input:checked + .atk-checkbox__box {
    background: var(--violet);
    border-color: var(--violet);
}

.atk-checkbox input:checked + .atk-checkbox__box::after {
    content: "";
    width: 4px;
    height: 8px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

/* ---------- Calendar (overrides for ion.calendar) ---------- */
.atk-cal-wrap { padding: 4px 0 6px; }

.myCalendar.active {
    font-family: "Onest", sans-serif;
    color: var(--ink);
}

.myCalendar table { width: 100%; border-collapse: collapse; }
.myCalendar table td,
.myCalendar table th {
    text-align: center;
    padding: 6px 4px;
    font-size: 13px;
    color: var(--ink-80);
    cursor: pointer;
    transition: color .15s, background .15s;
}

.myCalendar table td:hover { background: var(--violet-soft); color: var(--violet); }
.myCalendar table td.active,
.myCalendar table td.choosen,
.myCalendar table td.today {
    background: var(--violet);
    color: var(--white);
    font-weight: 600;
}

.myCalendar table td.passive { color: var(--ink-20); }
.myCalendar .head-i {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-60);
    padding: 8px 4px 6px;
    border-bottom: 1px solid var(--ink-15);
}
.myCalendar .ic-prev,
.myCalendar .ic-next {
    cursor: pointer;
    padding: 6px 10px;
    color: var(--ink);
    user-select: none;
}
.myCalendar .ic-month-name,
.myCalendar .ic-year-name {
    font-family: "Asgard", sans-serif;
    font-weight: 900;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: -0.005em;
    color: var(--ink);
    padding: 8px 0;
}

/* ---------- Date pagination ---------- */
.atk-datepag {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    margin: 8px 0 24px;
}

.atk-datepag__cell {
    border: 1px solid var(--ink-15);
    background: var(--white);
    padding: 10px 18px 8px;
    font-family: "Tiny5", monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    text-decoration: none;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    transition: color .15s, border-color .15s, background .15s;
}

.atk-datepag__cell + .atk-datepag__cell { margin-left: -1px; }

.atk-datepag__cell:hover {
    color: var(--violet);
    border-color: var(--violet);
    background: var(--violet-soft);
    z-index: 1;
    text-decoration: none;
}

.atk-datepag__cell.is-current {
    color: var(--ink);
    background: var(--paper-2);
    font-family: "Onest", sans-serif;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    padding: 10px 24px;
    z-index: 2;
}

/* ---------- Sub-card titles ---------- */
.atk-section-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ink-15);
}

.atk-section-title h2 {
    font-family: "Asgard", sans-serif;
    font-weight: 900;
    font-size: 32px;
    line-height: 0.92;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin: 0;
}

.atk-section-title h2 em { font-style: normal; color: var(--violet); }

.atk-section-title h3 {
    font-family: "Asgard", sans-serif;
    font-weight: 900;
    font-size: 22px;
    line-height: 0.95;
    letter-spacing: -0.005em;
    text-transform: uppercase;
    margin: 0;
}

.atk-mono {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
}

.atk-mono b { color: var(--ink); font-weight: 400; }

/* ---------- Tables (.tbl) ---------- */
.atk-tbl-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--ink-15);
    background: var(--white);
}

/* Wide statistic tables: let the table grow beyond the wrap and scroll horizontally. */
.atk-tbl-wrap > .grid-view > table.table-statistics {
    min-width: 1650px;
}

/* Generic display-toggle helper for JS (period range row, etc.). */
.atk-scope .is-hidden { display: none !important; }

.atk-tbl,
table.table-statistics,
table.table-show {
    width: 100%;
    border-collapse: collapse;
    font-family: "Onest", sans-serif;
    font-size: 14px;
    color: var(--ink-80);
    background: var(--white);
}

.atk-tbl thead th,
table.table-statistics thead th,
table.table-show thead th {
    background: var(--paper-2);
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    text-align: center;
    padding: 14px 12px 10px;
    border-bottom: 1px solid var(--ink);
    font-weight: 400;
    white-space: nowrap;
    vertical-align: middle;
}

.atk-tbl tbody td,
table.table-statistics tbody td,
table.table-show tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--ink-15);
    vertical-align: middle;
    color: var(--ink-80);
    text-align: center;
}

.atk-tbl tbody tr:hover td,
table.table-statistics tbody tr:hover td,
table.table-show tbody tr:hover td {
    background: var(--violet-soft);
    color: var(--ink);
}

.atk-tbl tbody tr:last-child td,
table.table-statistics tbody tr:last-child td,
table.table-show tbody tr:last-child td {
    border-bottom: none;
}

.atk-tbl tr.us td,
.atk-tbl tr.is-highlight td {
    background: rgba(132, 24, 254, 0.06);
    border-bottom-color: var(--violet);
    color: var(--ink);
    font-weight: 600;
}

.atk-tbl tr.us td:first-child,
.atk-tbl tr.is-highlight td:first-child { color: var(--violet); }

/* Bug-row painted left bar */
table.table-statistics tr.table-danger td {
    background: rgba(255, 45, 89, 0.08);
}
table.table-statistics tr.table-danger td:first-child {
    border-left: 3px solid var(--crimson);
}

table.table-statistics tr.table-info td {
    background: rgba(132, 24, 254, 0.06);
}
table.table-statistics tr.table-info td:first-child {
    border-left: 3px solid var(--violet);
}

table.table-statistics tr.table-warning td {
    background: rgba(255, 165, 2, 0.10);
}
table.table-statistics tr.table-warning td:first-child {
    border-left: 3px solid var(--yellow);
}

table.table-statistics tr.row-old-session td {
    background: rgba(255, 45, 89, 0.08);
}

/* nested mini-tables inside cells */
.table-mini {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 0;
}

.table-mini td {
    padding: 4px 6px;
    border: none;
    border-bottom: 1px dashed var(--ink-15);
    vertical-align: middle;
}

.table-mini tr:last-child td { border-bottom: none; }

.table-mini__num {
    color: var(--ink-40);
    font-family: "Tiny5", monospace;
    font-size: 10px;
    letter-spacing: 0.06em;
    width: 22px;
}

.table-mini__name {
    color: var(--ink);
    font-weight: 500;
}

.table-mini__dur {
    color: var(--ink-60);
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-align: right;
    white-space: nowrap;
}

.table-mini__action { text-align: right; width: 80px; }

/* Pager */
.atk-tbl-wrap + .pagination,
.summary + .pagination,
.list-pages,
ul.pagination {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

ul.pagination li {
    list-style: none;
}

ul.pagination li a,
ul.pagination li span {
    display: inline-block;
    font-family: "Tiny5", monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    padding: 8px 12px 6px;
    border: 1px solid var(--ink-15);
    background: var(--white);
    text-decoration: none;
    line-height: 1;
}

ul.pagination li a:hover {
    color: var(--violet);
    border-color: var(--violet);
    background: var(--violet-soft);
}

ul.pagination li.active span,
ul.pagination li.active a {
    background: var(--violet);
    border-color: var(--violet);
    color: var(--white);
}

ul.pagination li.disabled span {
    color: var(--ink-20);
    cursor: not-allowed;
}

/* ---------- Buttons ---------- */
.atk-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "Tiny5", monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--ink);
    padding: 11px 18px 9px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

.atk-btn:hover {
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
}

.atk-btn.is-primary {
    background: var(--violet);
    border-color: var(--violet);
    color: var(--white);
}
.atk-btn.is-primary:hover { background: var(--violet-500); border-color: var(--violet-500); }

.atk-btn.is-yellow {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--ink);
}
.atk-btn.is-yellow:hover { background: #FF8B02; border-color: #FF8B02; }

.atk-btn.is-ghost {
    background: transparent;
    border-color: var(--ink-15);
    color: var(--ink-60);
}
.atk-btn.is-ghost:hover { color: var(--ink); border-color: var(--ink); background: transparent; }

.atk-btn.is-sm { padding: 7px 12px 5px; font-size: 11px; }

/* ---------- Alert / callout ---------- */
.atk-callout {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 18px;
    align-items: start;
    padding: 22px 26px;
    background: var(--yellow);
    border: 1px solid var(--yellow);
    color: var(--ink);
    margin-bottom: 24px;
}

.atk-callout.is-crimson { background: var(--crimson); border-color: var(--crimson); color: var(--white); }
.atk-callout.is-violet { background: var(--violet); border-color: var(--violet); color: var(--white); }
.atk-callout.is-soft { background: var(--paper-2); border-color: var(--ink-15); color: var(--ink); }

.atk-callout__icon {
    width: 56px;
    height: 56px;
    border: 1.5px solid currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Asgard", sans-serif;
    font-weight: 900;
    font-size: 30px;
    line-height: 1;
}

.atk-callout__title {
    font-family: "Asgard", sans-serif;
    font-weight: 900;
    font-size: 22px;
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: -0.005em;
    margin: 0 0 6px;
}

.atk-callout__body {
    font-family: "Onest", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* ---------- Sidebar layout (dashboard top) ---------- */
.atk-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 24px;
}

.atk-grid > section,
.atk-grid > aside { min-width: 0; }

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

@media (max-width: 600px) {
    .atk-page { padding: 18px; }
    .atk-page__title { font-size: 40px; }
    .atk-kpi-grid { grid-template-columns: 1fr; }
    .atk-kpi__value { font-size: 48px; }
    .atk-page__head { grid-template-columns: 1fr; align-items: start; }
    .atk-page__meta { text-align: left; }
}

/* ---------- Definition list (KPI inside card) ---------- */
.atk-dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: baseline;
}

.atk-dl dt,
.atk-dl li > span:first-child {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    line-height: 1.3;
}

.atk-dl dd,
.atk-dl li > span:last-child {
    text-align: right;
    font-family: "Onest", sans-serif;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
    font-size: 14px;
}

.atk-dl li {
    display: contents;
}

.atk-dl-row { padding: 8px 0; border-bottom: 1px dashed var(--ink-15); display: contents; }

/* ---------- User selector card ---------- */
.atk-user-pick {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 16px;
    background: var(--paper-2);
    border: 1px solid var(--ink-15);
    margin-bottom: 18px;
}

/* Compact variant — fits inside narrow sidebar (under filters) */
.atk-user-pick.is-compact {
    padding: 8px 10px;
    gap: 6px;
    margin-bottom: 12px;
}

.atk-user-pick.is-compact .atk-user-pick__nav {
    width: 30px;
    height: 30px;
    font-size: 12px;
    flex: none;
}

.atk-user-pick__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--white);
    border: 1px solid var(--ink-15);
    color: var(--ink);
    font-family: "Tiny5", monospace;
    font-size: 14px;
    text-decoration: none;
    line-height: 1;
    transition: background .15s, border-color .15s, color .15s;
}

.atk-user-pick__nav:hover {
    background: var(--violet);
    border-color: var(--violet);
    color: var(--white);
    text-decoration: none;
}

.atk-user-pick__nav.is-disabled {
    color: var(--ink-20);
    cursor: not-allowed;
    pointer-events: none;
}

.atk-user-pick select { flex: 1; }

/* ---------- Inline links ---------- */
.atk-link {
    color: var(--violet);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .15s;
}

.atk-link:hover { color: var(--violet-500); border-bottom-color: currentColor; text-decoration: none; }

/* ---------- Form (active form re-skin) ---------- */
.atk-form .form-group { margin-bottom: 18px; }

.atk-form .control-label,
.atk-form label {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    line-height: 1;
    margin-bottom: 6px;
    display: inline-block;
}

.atk-form .form-control {
    font-family: "Onest", sans-serif;
    font-size: 14px;
    line-height: 1.2;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--ink-15);
    border-radius: 0;
    padding: 10px 12px;
    width: 100%;
}

.atk-form .form-control:focus {
    outline: none;
    border-color: var(--violet);
    box-shadow: 0 0 0 3px var(--violet-soft);
}

.atk-form .help-block {
    font-size: 12px;
    color: var(--crimson);
    margin-top: 4px;
}

/* ---------- Charts containers ---------- */
.atk-chart-tabs {
    display: inline-flex;
    margin-bottom: 14px;
    border: 1px solid var(--ink-15);
}

.atk-chart-tabs button,
.atk-chart-tabs a {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    background: var(--white);
    border: none;
    padding: 9px 16px 7px;
    cursor: pointer;
    line-height: 1;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.atk-chart-tabs button + button,
.atk-chart-tabs a + a {
    border-left: 1px solid var(--ink-15);
}

.atk-chart-tabs button:hover,
.atk-chart-tabs a:hover { color: var(--ink); }

.atk-chart-tabs button.is-active,
.atk-chart-tabs a.is-active { background: var(--violet); color: var(--white); }

/* ---------- Misc ---------- */
.atk-divider {
    height: 1px;
    background: var(--ink-15);
    margin: 24px 0;
    border: 0;
}

.atk-spacer-sm { height: 12px; }
.atk-spacer-md { height: 24px; }
.atk-spacer-lg { height: 48px; }

.atk-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.15em;
    fill: currentColor;
}

.atk-text-muted { color: var(--ink-40); }
.atk-text-danger { color: var(--crimson); }
.atk-text-success { color: var(--violet); }

.atk-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 2px;
    font-family: "Tiny5", monospace;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid var(--ink-15);
    background: var(--white);
    color: var(--ink-60);
    line-height: 1;
}

.atk-tag-pill.is-violet { color: var(--violet); border-color: var(--violet); }
.atk-tag-pill.is-yellow { color: var(--yellow); border-color: var(--yellow); }
.atk-tag-pill.is-crimson { color: var(--crimson); border-color: var(--crimson); }

/* Hide legacy decorations that conflict with our skin */
body.atk-body .header,
body.atk-body .navbar.bg-dark,
body.atk-body .wrap > .container > .breadcrumb { display: none !important; }

/* Wrap from old site.css padding fix */
body.atk-body .wrap { min-height: auto; margin: 0; padding: 0; }
body.atk-body .wrap > .container,
body.atk-body .wrap > .container-fluid { padding: 0; max-width: none; }

/* Map territory table padding */
#map-territory-table { width: 100%; }

/* Help text under filters */
.atk-help {
    font-family: "Onest", sans-serif;
    font-size: 12px;
    color: var(--ink-40);
    line-height: 1.4;
    margin-top: 6px;
}

/* Empty state */
.atk-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--ink-40);
    font-family: "Onest", sans-serif;
    font-size: 14px;
    border: 1px dashed var(--ink-15);
    background: var(--paper);
}

.atk-empty strong {
    display: block;
    color: var(--ink);
    font-family: "Asgard", sans-serif;
    font-weight: 900;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: -0.005em;
    margin-bottom: 6px;
}

/* Quick filters strip */
.atk-quick {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

/* Override Yii GridView spacing */
.grid-view { background: transparent; padding: 0; }
.grid-view .summary {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    margin-bottom: 12px;
}

/* Bootstrap5 alert overrides (for Alert::widget()) */
.atk-scope .alert {
    border-radius: 0;
    border: 1px solid var(--ink-15);
    padding: 14px 18px;
    font-family: "Onest", sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink);
    background: var(--paper-2);
    margin-bottom: 18px;
}

.atk-scope .alert-success { border-color: var(--violet); background: var(--violet-soft); color: var(--ink); }
.atk-scope .alert-danger { border-color: var(--crimson); background: rgba(255,45,89,0.10); color: var(--ink); }
.atk-scope .alert-warning { border-color: var(--yellow); background: rgba(255,165,2,0.12); color: var(--ink); }
.atk-scope .alert-info { border-color: var(--violet); background: var(--violet-soft); color: var(--ink); }

/* =========================================================
   Altairika Mini Calendar (atk-calendar.js)
   ========================================================= */
.atk-cal {
    --cal-cell: 36px;
    width: 100%;
    user-select: none;
    color: var(--ink);
    font-family: "Onest", sans-serif;
}

.atk-cal__head {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;
    gap: 8px;
    padding: 4px 0 12px;
    border-bottom: 1px solid var(--ink-15);
    margin-bottom: 8px;
}

.atk-cal__nav {
    width: 36px;
    height: 36px;
    border: 1px solid var(--ink-15);
    background: var(--white);
    color: var(--ink);
    font-family: "Tiny5", monospace;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s, border-color .15s, color .15s;
}

.atk-cal__nav:hover {
    background: var(--violet);
    border-color: var(--violet);
    color: var(--white);
}

.atk-cal__title {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    text-align: center;
}

.atk-cal__title-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    color: var(--ink);
    transition: color .15s;
}

.atk-cal__title-btn:hover { color: var(--violet); }

.atk-cal__title-month {
    font-family: "Asgard", sans-serif;
    font-weight: 900;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: -0.005em;
}

.atk-cal__title-year {
    font-family: "Tiny5", monospace;
    font-size: 14px;
    letter-spacing: 0.10em;
    color: var(--ink-60);
}

.atk-cal__title-year:hover { color: var(--violet); }

.atk-cal__grid {
    display: grid;
    gap: 2px;
}

.atk-cal__grid--days {
    grid-template-columns: repeat(7, 1fr);
}

.atk-cal__grid--months {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding-top: 6px;
}

.atk-cal__grid--years {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding-top: 6px;
}

.atk-cal__dow {
    font-family: "Tiny5", monospace;
    font-size: 10px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-40);
    text-align: center;
    padding: 6px 0;
    line-height: 1;
}

.atk-cal__day,
.atk-cal__month,
.atk-cal__year {
    font-family: "Onest", sans-serif;
    font-size: 13px;
    color: var(--ink);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: background .15s, color .15s, border-color .15s;
}

.atk-cal__day {
    height: var(--cal-cell);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.atk-cal__day:hover {
    background: var(--violet-soft);
    color: var(--violet);
}

.atk-cal__day--mute { color: var(--ink-20); }

.atk-cal__day--today {
    color: var(--violet);
    font-weight: 700;
}

.atk-cal__day--today::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--violet);
    border-radius: 50%;
    margin-top: 22px;
}

.atk-cal__day--selected {
    background: var(--violet);
    color: var(--white);
    font-weight: 700;
    border-color: var(--violet);
}

.atk-cal__day--selected:hover {
    background: var(--violet-500);
    color: var(--white);
}

/* GitHub-style heatmap по числу зрителей за день. 5 ступеней плотности — от
 * лёгкого тонирования до сплошного фирменного фиолетового (--violet). */
.atk-cal__day--heat-1 { background: rgba(132, 24, 254, 0.12); }
.atk-cal__day--heat-2 { background: rgba(132, 24, 254, 0.28); }
.atk-cal__day--heat-3 { background: rgba(132, 24, 254, 0.48); }
.atk-cal__day--heat-4 { background: rgba(132, 24, 254, 0.72); color: var(--white); }
.atk-cal__day--heat-5 { background: var(--violet); color: var(--white); }

/* Hover-обработка специально для heat-ячеек — не даём перекрыть нашу заливку
 * легче-тонированным dim hover'ом базового стиля. */
.atk-cal__day--heat-1:hover,
.atk-cal__day--heat-2:hover,
.atk-cal__day--heat-3:hover { color: var(--violet); filter: brightness(0.92); }
.atk-cal__day--heat-4:hover,
.atk-cal__day--heat-5:hover { color: var(--white); filter: brightness(1.08); }

/* Если день одновременно selected и heat — selected всегда наглядно поверх
 * (легкая обводка для контраста с тёмной heat-заливкой). */
.atk-cal__day--selected.atk-cal__day--heat-4,
.atk-cal__day--selected.atk-cal__day--heat-5 {
    box-shadow: inset 0 0 0 2px var(--white);
}

.atk-cal__month,
.atk-cal__year {
    height: 38px;
    font-family: "Tiny5", monospace;
    font-size: 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-60);
    border: 1px solid var(--ink-15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.atk-cal__month:hover,
.atk-cal__year:hover {
    color: var(--violet);
    border-color: var(--violet);
    background: var(--violet-soft);
}

.atk-cal__month--selected,
.atk-cal__year--selected {
    background: var(--violet);
    border-color: var(--violet);
    color: var(--white);
}

/* Hide the old ion.calendar legacy markup if it ever leaks in */
.myCalendar > table { display: none; }

/* =========================================================
   jQuery UI DatePicker — re-skin to match Altairika
   (used in systems.php column filters)
   ========================================================= */
.ui-datepicker {
    background: var(--white);
    border: 1px solid var(--ink);
    box-shadow: var(--shadow-pop);
    padding: 14px;
    border-radius: 0;
    width: 280px;
    font-family: "Onest", sans-serif;
    font-size: 13px;
    color: var(--ink);
    z-index: 1100 !important;
    /* Reset jQuery UI widget defaults */
    box-sizing: border-box;
}

/* Header layout — uses CSS grid AREAS so that prev/title/next render in
   the right visual order regardless of jQuery UI's DOM order
   (which is: prev, next, title). */
.ui-datepicker .ui-datepicker-header {
    background: transparent;
    border: none;
    padding: 0 0 10px;
    margin: 0 0 10px;
    border-bottom: 1px solid var(--ink-15);
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    grid-template-areas: "prev title next";
    align-items: center;
    gap: 8px;
    position: relative;
    border-radius: 0;
    height: auto;
}

.ui-datepicker .ui-datepicker-prev { grid-area: prev; }
.ui-datepicker .ui-datepicker-next { grid-area: next; }
.ui-datepicker .ui-datepicker-title { grid-area: title; }

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    position: static !important;
    cursor: pointer;
    border: 1px solid var(--ink-15);
    background: var(--white);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    border-radius: 0;
    overflow: hidden;          /* hide the literal "Prev"/"Next" text */
    transition: background .15s, border-color .15s, color .15s;
    color: var(--ink);
    /* Replace jQuery UI sprite/text with a clean glyph via ::before */
    font-size: 0;              /* hides any text node */
}

.ui-datepicker .ui-datepicker-prev::before,
.ui-datepicker .ui-datepicker-next::before {
    font-family: "Tiny5", monospace;
    font-size: 16px;
    line-height: 1;
    color: inherit;
    display: inline-block;
}

.ui-datepicker .ui-datepicker-prev::before { content: "‹"; }
.ui-datepicker .ui-datepicker-next::before { content: "›"; }

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background: var(--violet);
    border-color: var(--violet);
    color: var(--white);
}

/* Hide the inner ui-icon span entirely — we draw the arrow on the parent */
.ui-datepicker .ui-datepicker-prev .ui-icon,
.ui-datepicker .ui-datepicker-next .ui-icon {
    display: none !important;
}

.ui-datepicker .ui-datepicker-prev.ui-state-disabled,
.ui-datepicker .ui-datepicker-next.ui-state-disabled {
    color: var(--ink-20);
    border-color: var(--ink-15);
    cursor: not-allowed;
    opacity: 1;
    background: var(--paper);
}

.ui-datepicker .ui-datepicker-prev.ui-state-disabled:hover,
.ui-datepicker .ui-datepicker-next.ui-state-disabled:hover {
    background: var(--paper);
    color: var(--ink-20);
    border-color: var(--ink-15);
}

/* Title block (month + year). When changeMonth/changeYear are NOT enabled
   the children are <span> — render as inline typography.
   When enabled, jQuery UI renders <select> instead — those get atk-input look. */
.ui-datepicker .ui-datepicker-title {
    text-align: center;
    margin: 0;
    line-height: 1;
    display: inline-flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Default: <span> nodes — pure text, no chrome */
.ui-datepicker .ui-datepicker-title > span {
    border: none;
    padding: 0;
    background: transparent;
    line-height: 1;
}

.ui-datepicker .ui-datepicker-title .ui-datepicker-month {
    font-family: "Asgard", sans-serif;
    font-weight: 900;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: -0.005em;
    color: var(--ink);
}

.ui-datepicker .ui-datepicker-title .ui-datepicker-year {
    font-family: "Tiny5", monospace;
    font-size: 13px;
    letter-spacing: 0.10em;
    color: var(--ink-60);
    font-weight: 400;
}

/* If changeMonth / changeYear are enabled, jQuery UI renders <select>'s.
   Render those like our atk-input. */
.ui-datepicker .ui-datepicker-title select.ui-datepicker-month,
.ui-datepicker .ui-datepicker-title select.ui-datepicker-year {
    font-family: "Onest", sans-serif;
    font-size: 13px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--ink-15);
    border-radius: 0;
    padding: 6px 8px;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    appearance: menulist;
    -webkit-appearance: menulist;
    line-height: 1.2;
}

.ui-datepicker .ui-datepicker-title select.ui-datepicker-year {
    font-family: "Tiny5", monospace;
    letter-spacing: 0.06em;
}

.ui-datepicker table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 13px;
}

.ui-datepicker th {
    font-family: "Tiny5", monospace;
    font-size: 10px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-40);
    font-weight: 400;
    padding: 6px 0;
    border: none;
    text-align: center;
}

.ui-datepicker td {
    padding: 0;
    border: none;
}

.ui-datepicker td a,
.ui-datepicker td span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 32px;
    text-align: center;
    text-decoration: none;
    color: var(--ink-80);
    background: transparent;
    border: 1px solid transparent;
    font-family: "Onest", sans-serif;
    transition: background .15s, color .15s, border-color .15s;
}

.ui-datepicker td a:hover {
    background: var(--violet-soft);
    color: var(--violet);
}

.ui-datepicker td.ui-state-disabled span {
    color: var(--ink-20);
}

.ui-datepicker td.ui-datepicker-today a,
.ui-datepicker td.ui-datepicker-today span {
    color: var(--violet);
    font-weight: 700;
    border-color: var(--violet);
    background: transparent;
}

.ui-datepicker td.ui-datepicker-current-day a,
.ui-datepicker td a.ui-state-active,
.ui-datepicker td a.ui-state-highlight {
    background: var(--violet);
    color: var(--white);
    border-color: var(--violet);
    font-weight: 700;
}

.ui-datepicker .ui-datepicker-buttonpane {
    border-top: 1px solid var(--ink-15);
    padding: 8px 0 0;
    margin-top: 10px;
}

.ui-datepicker .ui-datepicker-buttonpane button {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--ink-15);
    background: var(--white);
    color: var(--ink);
    padding: 8px 12px 6px;
    line-height: 1;
    cursor: pointer;
    border-radius: 0;
    margin: 0 4px 0 0;
}

.ui-datepicker .ui-datepicker-buttonpane button:hover {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
}

/* Make sure the floating popup sits above modals */
body > .ui-datepicker { z-index: 1100 !important; }

/* Re-skin GridView filter inputs to match Altairika */
.atk-scope .grid-view tr.filters .form-control,
.atk-scope .grid-view tr.filters input[type="text"] {
    font-family: "Onest", sans-serif;
    font-size: 13px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--ink-15);
    border-radius: 0;
    padding: 8px 10px;
    box-shadow: none;
}

.atk-scope .grid-view tr.filters .form-control:focus,
.atk-scope .grid-view tr.filters input[type="text"]:focus {
    outline: none;
    border-color: var(--violet);
    box-shadow: 0 0 0 3px var(--violet-soft);
}

/* =========================================================
   GridView — Altairika polish for /statistic
   ========================================================= */

/* Kill the legacy jQuery paginate plugin output everywhere */
.paginateContainer { display: none !important; }

/* GridView container */
.atk-scope .grid-view {
    background: transparent;
    padding: 0;
    border: none;
}

/* "Showing X of Y" line */
.atk-scope .grid-view .summary,
.atk-scope .atk-tbl-summary {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    padding: 10px 14px;
    border: 0;
    background: transparent;
    margin-bottom: 0;
}

.atk-scope .grid-view .summary b,
.atk-scope .atk-tbl-summary b { color: var(--ink); font-weight: 400; }

/* Empty-state row */
.atk-empty-cell {
    padding: 0 !important;
    background: var(--paper) !important;
}

.atk-empty {
    text-align: center;
    padding: 56px 24px;
    color: var(--ink-40);
    font-family: "Onest", sans-serif;
    font-size: 14px;
    border: 1px dashed var(--ink-15);
    background: var(--paper);
}

.atk-empty strong {
    display: block;
    color: var(--ink);
    font-family: "Asgard", sans-serif;
    font-weight: 900;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: -0.005em;
    margin-bottom: 8px;
}

/* GridView default empty text bubble (used when filters return nothing) */
.atk-scope .grid-view .empty {
    text-align: center;
    padding: 40px 24px;
    color: var(--ink-40);
    font-family: "Onest", sans-serif;
    font-size: 14px;
    background: var(--paper);
}

/* Filter row */
.atk-scope .grid-view tr.filters th,
.atk-scope .grid-view tr.filters td {
    background: var(--paper-2);
    padding: 8px 10px;
    border-bottom: 1px solid var(--ink-15);
}

.atk-scope .grid-view tr.filters .form-control,
.atk-scope .grid-view tr.filters input[type="text"] {
    font-family: "Onest", sans-serif;
    font-size: 13px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--ink-15);
    border-radius: 0;
    padding: 7px 10px;
    box-shadow: none;
    width: 100%;
    line-height: 1.2;
}

.atk-scope .grid-view tr.filters .form-control:focus,
.atk-scope .grid-view tr.filters input[type="text"]:focus {
    outline: none;
    border-color: var(--violet);
    box-shadow: 0 0 0 3px var(--violet-soft);
}

/* Sortable header anchors */
.atk-scope .grid-view thead th a {
    color: var(--ink-60);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .15s;
}

.atk-scope .grid-view thead th a:hover { color: var(--violet); }

.atk-scope .grid-view thead th a.asc::after,
.atk-scope .grid-view thead th a.desc::after {
    font-family: "Tiny5", monospace;
    font-size: 10px;
    color: var(--violet);
    margin-left: 2px;
}

.atk-scope .grid-view thead th a.asc::after  { content: "▲"; }
.atk-scope .grid-view thead th a.desc::after { content: "▼"; }

/* Yii pager (LinkPager) — pill chips */
.atk-tbl-pager {
    display: flex;
    justify-content: center;
    padding: 16px 12px;
    border: 1px solid var(--ink-15);
    border-top: 0;
    background: var(--white);
}

.atk-scope ul.pagination,
.atk-scope ul.pagination.atk-pagination {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.atk-scope ul.pagination li {
    list-style: none;
    margin: 0;
}

.atk-scope ul.pagination li + li { margin-left: -1px; }

.atk-scope ul.pagination li a,
.atk-scope ul.pagination li span,
.atk-scope ul.pagination li a.atk-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-family: "Tiny5", monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    border: 1px solid var(--ink-15);
    background: var(--white);
    text-decoration: none;
    line-height: 1;
    transition: color .15s, border-color .15s, background .15s;
    box-shadow: none;
}

.atk-scope ul.pagination li a:hover {
    color: var(--violet);
    border-color: var(--violet);
    background: var(--violet-soft);
    z-index: 2;
    text-decoration: none;
}

.atk-scope ul.pagination li.active span,
.atk-scope ul.pagination li.active a {
    background: var(--violet);
    border-color: var(--violet);
    color: var(--white);
    z-index: 1;
}

.atk-scope ul.pagination li.disabled span,
.atk-scope ul.pagination li.disabled a,
.atk-scope ul.pagination li span.is-disabled {
    color: var(--ink-20);
    background: var(--paper);
    cursor: not-allowed;
    pointer-events: none;
}

.atk-scope ul.pagination li.first a,
.atk-scope ul.pagination li.last a,
.atk-scope ul.pagination li.first span,
.atk-scope ul.pagination li.last span {
    font-family: "Tiny5", monospace;
    font-size: 14px;
}

/* Tighten table spacing in atk-tbl-wrap (no double border) */
.atk-tbl-wrap > .grid-view > table.atk-tbl,
.atk-tbl-wrap > .grid-view > table.table-statistics {
    border: none;
}

.atk-tbl-wrap > .grid-view > .summary {
    border-top: 0;
}

/* The wrap removes its own border when GridView already has summary/pager */
.atk-tbl-wrap:has(.grid-view .summary) { border: none; }
.atk-tbl-wrap:has(.grid-view .pagination) { border: none; }

/* Yii Bootstrap5 LinkPager — page-item / page-link compatibility */
.atk-scope ul.pagination li.page-item a.page-link,
.atk-scope ul.pagination li.page-item span.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-family: "Tiny5", monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-60);
    border: 1px solid var(--ink-15);
    background: var(--white);
    text-decoration: none;
    line-height: 1;
    transition: color .15s, border-color .15s, background .15s;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
}

.atk-scope ul.pagination li.page-item a.page-link:hover {
    color: var(--violet);
    border-color: var(--violet);
    background: var(--violet-soft);
    z-index: 2;
}

.atk-scope ul.pagination li.page-item.active a.page-link,
.atk-scope ul.pagination li.page-item.active span.page-link {
    background: var(--violet);
    border-color: var(--violet);
    color: var(--white);
    z-index: 1;
}

.atk-scope ul.pagination li.page-item.disabled a.page-link,
.atk-scope ul.pagination li.page-item.disabled span.page-link {
    color: var(--ink-20);
    background: var(--paper);
    cursor: not-allowed;
    pointer-events: none;
}

/* The outer <nav class="pagination"> element shouldn't itself style as a chip */
.atk-scope nav.pagination {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

/* Killing Bootstrap's page-link box-shadow on focus */
.atk-scope .page-link:focus {
    box-shadow: 0 0 0 3px var(--violet-soft);
    outline: none;
}

/* ================================================================ */
/* Mobile burger menu (header drawer)                               */
/* ================================================================ */

/* Burger is hidden on desktop */
.atk-burger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--ink-15);
    background: var(--white);
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    grid-column: 3;
    justify-self: end;
    transition: border-color .15s, background .15s;
}

.atk-burger:hover { border-color: var(--ink); }

.atk-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
    transition: transform .25s, opacity .15s;
    transform-origin: center;
}

.atk-header.is-open .atk-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.atk-header.is-open .atk-burger span:nth-child(2) {
    opacity: 0;
}
.atk-header.is-open .atk-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Backdrop */
.atk-header__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(24, 22, 20, 0.45);
    z-index: 1029;
    opacity: 0;
    transition: opacity .25s;
}

.atk-header.is-open .atk-header__backdrop {
    display: block;
    opacity: 1;
}

@media (max-width: 900px) {
    .atk-header__inner {
        grid-template-columns: auto auto;
        padding: 12px 18px;
        gap: 12px;
    }

    .atk-brand__sep,
    .atk-brand__desc { display: none; }

    .atk-burger {
        display: flex;
    }

    /* Drawer */
    .atk-header__panel {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 86vw);
        background: var(--paper);
        border-left: 1px solid var(--ink);
        box-shadow: -16px 0 40px rgba(24, 22, 20, 0.14);
        padding: 80px 24px 28px;
        z-index: 1031;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform .28s ease;
        gap: 18px;
    }

    .atk-header.is-open .atk-header__panel {
        transform: translateX(0);
    }

    .atk-header__panel .atk-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding-bottom: 18px;
        border-bottom: 1px solid var(--ink-15);
    }

    .atk-header__panel .atk-nav__link {
        padding: 14px 12px;
        text-align: left;
        font-size: 13px;
        white-space: normal;
    }

    .atk-header__panel .atk-header__right {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        justify-self: stretch;
    }

    .atk-header__panel .atk-user {
        order: -1;
        justify-content: flex-start;
        padding: 10px 12px 8px;
    }

    .atk-header__panel .atk-user b {
        max-width: none;
    }

    .atk-header__panel .atk-lang {
        align-self: flex-start;
    }

    .atk-header__panel .atk-btn-logout {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Lock body scroll when drawer is open */
    body.atk-no-scroll {
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .atk-header__inner { padding: 10px 14px; }
    .atk-brand__logo { height: 24px; }
}

/* ================================================================ */
/* Error screen (404 / 500 / etc.)                                  */
/* ================================================================ */

.atk-error-body {
    min-height: 100vh;
    margin: 0;
    background: var(--paper);
    display: flex;
    flex-direction: column;
}

.atk-error-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 36px;
    border-bottom: 1px solid var(--ink-15);
    background: var(--white);
}

.atk-error-shell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    position: relative;
    overflow: hidden;
}

.atk-error-shell::before,
.atk-error-shell::after {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
}

.atk-error-shell::before {
    inset: -20% -10% auto auto;
    width: 50%;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(132, 24, 254, 0.10) 0%, transparent 60%);
}

.atk-error-shell::after {
    inset: auto auto -25% -10%;
    width: 45%;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(255, 165, 2, 0.16) 0%, transparent 65%);
}

.atk-error-foot {
    text-align: center;
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-40);
    padding: 14px 24px;
    border-top: 1px solid var(--ink-15);
    background: var(--white);
}

.atk-error-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    text-align: left;
}

.atk-error-card__code {
    font-family: "Asgard", "Onest", sans-serif;
    font-weight: 900;
    font-size: clamp(140px, 22vw, 280px);
    line-height: 0.85;
    letter-spacing: -0.04em;
    margin: 4px 0 16px;
    color: var(--violet);
}

.atk-error-card__code.is-yellow  { color: var(--yellow); }
.atk-error-card__code.is-crimson { color: var(--crimson); }
.atk-error-card__code.is-violet  { color: var(--violet); }

.atk-error-card__title {
    font-family: "Asgard", "Onest", sans-serif;
    font-weight: 900;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.0;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0 0 12px;
}

.atk-error-card__title em {
    font-style: normal;
    color: var(--violet);
}

.atk-error-card__sub {
    font-family: "Onest", sans-serif;
    font-size: 16px;
    color: var(--ink-60);
    line-height: 1.55;
    max-width: 50ch;
    margin: 0 0 24px;
}

.atk-error-card__msg {
    background: var(--paper-2);
    border: 1px solid var(--ink-15);
    padding: 14px 16px;
    margin: 0 0 24px;
    max-width: 100%;
    overflow: hidden;
}

.atk-error-card__msg .atk-mono {
    display: block;
    font-family: "Tiny5", monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-40);
    margin-bottom: 8px;
}

.atk-error-card__msg pre {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    color: var(--ink-80);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 220px;
    overflow-y: auto;
    background: transparent;
    border: 0;
}

.atk-error-card__actions {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.atk-error-card__actions .atk-btn {
    min-width: 140px;
    height: 48px;
    padding: 0 22px;
}

.atk-error-card__support {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-40);
    margin: 0;
}

@media (max-width: 640px) {
    .atk-error-topbar { padding: 16px 20px; }
    .atk-error-shell  { padding: 32px 20px; }
    .atk-error-card__title { font-size: 28px; }
    .atk-error-card__sub   { font-size: 14px; }
}

/* ================================================================ */
/* Territory map (/site/map)                                        */
/* ================================================================ */

.atk-map-card {
    padding: 22px 26px;
}

.atk-map-search {
    position: relative;
    margin: 14px 0 18px;
}

.atk-map-search__input {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    font-size: 15px;
}

.atk-map-search__results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--ink-15);
    box-shadow: 0 12px 32px rgba(24, 22, 20, 0.10);
    z-index: 5;
    display: none;
}

.atk-map-search__group {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-60);
    background: var(--paper-2);
    padding: 8px 14px;
    border-bottom: 1px solid var(--ink-15);
}

.atk-map-search__item {
    padding: 10px 14px;
    font-family: "Onest", sans-serif;
    font-size: 14px;
    color: var(--ink-80);
    cursor: pointer;
    border-bottom: 1px solid var(--ink-15);
    transition: background .12s, color .12s;
}

.atk-map-search__item:last-child {
    border-bottom: none;
}

.atk-map-search__item:hover {
    background: var(--violet-soft);
    color: var(--ink);
}

.atk-map-search__item--empty {
    color: var(--ink-40);
    cursor: default;
}

.atk-map-search__item--empty:hover {
    background: transparent;
    color: var(--ink-40);
}

.atk-map {
    width: 100%;
    height: 72vh;
    min-height: 480px;
    border: 1px solid var(--ink-15);
    background: var(--paper-2);
}

.atk-map-iw {
    font-family: "Onest", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    padding: 4px 6px;
}

.atk-map-legend {
    display: flex;
    gap: 22px;
    margin-top: 14px;
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-60);
}

.atk-map-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.atk-map-legend__swatch {
    width: 14px;
    height: 14px;
    border: 1px solid var(--ink-15);
    display: inline-block;
}

.atk-map-legend__swatch.is-violet {
    background: rgba(132, 24, 254, 0.20);
    border-color: var(--violet);
}

.atk-map-legend__swatch.is-yellow {
    background: rgba(255, 165, 2, 0.40);
    border-color: var(--orange);
}

@media (max-width: 720px) {
    .atk-map { height: 60vh; min-height: 360px; }
    .atk-map-card { padding: 16px; }
}

/* ================================================================ */
/* Auth screen (login)                                              */
/* ================================================================ */

.atk-auth-body {
    min-height: 100vh;
    margin: 0;
    background: var(--paper);
}

.atk-auth {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* --- Brand panel (left) --- */
.atk-auth__brand {
    position: relative;
    overflow: hidden;
    padding: 48px 56px 56px;
    background: linear-gradient(150deg, var(--violet) 0%, var(--lilac) 70%, #6a0fc7 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    isolation: isolate;
}

.atk-auth__brand::before {
    content: "";
    position: absolute;
    inset: -25% -25% auto auto;
    width: 70%;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.20) 0%, transparent 65%);
    z-index: -1;
    border-radius: 50%;
}

.atk-auth__brand::after {
    content: "";
    position: absolute;
    inset: auto auto -30% -10%;
    width: 55%;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(255, 165, 2, 0.25) 0%, transparent 70%);
    z-index: -1;
    border-radius: 50%;
}

.atk-auth__brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.atk-auth__brand-mark {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

.atk-auth__brand-eyebrow {
    margin-top: 18px;
    font-family: "Tiny5", monospace;
    font-size: 12px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.70);
}

.atk-auth__brand-title {
    font-family: "Asgard", "Onest", sans-serif;
    font-weight: 900;
    font-size: clamp(60px, 8vw, 116px);
    line-height: 0.92;
    letter-spacing: -0.02em;
    margin: 12px 0 18px;
    color: var(--white);
}

.atk-auth__brand-title em {
    font-style: normal;
    color: var(--yellow);
}

.atk-auth__brand-sub {
    font-family: "Onest", sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 32ch;
    line-height: 1.45;
    margin: 0 0 32px;
}

.atk-auth__brand-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 168px;
    margin-top: auto;
    opacity: 0.55;
}

.atk-auth__brand-grid span {
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 2px;
}

.atk-auth__brand-grid span:nth-child(3n+1) {
    background: var(--yellow);
    border-color: var(--yellow);
}

.atk-auth__brand-grid span:nth-child(7n) {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
}

/* --- Form panel (right) --- */
.atk-auth__main {
    display: flex;
    flex-direction: column;
    padding: 28px 48px 32px;
    background: var(--paper);
}

.atk-auth__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.atk-auth__topbar .atk-mono {
    font-family: "Tiny5", monospace;
    font-size: 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-60);
}

.atk-auth__lang {
    display: flex;
    gap: 6px;
}

.atk-auth__shell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}

.atk-auth__foot {
    text-align: center;
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-40);
    padding-top: 16px;
    border-top: 1px solid var(--ink-15);
}

/* --- Auth card (form container) --- */
.atk-auth-card {
    width: 100%;
    max-width: 440px;
}

.atk-auth-card__head {
    margin-bottom: 28px;
}

.atk-auth-card__title {
    font-family: "Asgard", "Onest", sans-serif;
    font-weight: 900;
    font-size: 56px;
    line-height: 0.95;
    letter-spacing: -0.015em;
    margin: 8px 0 12px;
    color: var(--ink);
}

.atk-auth-card__title em {
    font-style: normal;
    color: var(--violet);
}

.atk-auth-card__sub {
    font-family: "Onest", sans-serif;
    font-size: 15px;
    color: var(--ink-60);
    margin: 0;
}

/* --- Form fields --- */
.atk-auth-form .atk-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.atk-auth-field__label {
    font-family: "Tiny5", monospace;
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ink-60);
    font-weight: 400;
    margin: 0;
}

.atk-auth-form .atk-input {
    width: 100%;
    height: 48px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: "Onest", sans-serif;
}

.atk-auth-field__error {
    color: var(--crimson);
    font-size: 12px;
    font-family: "Onest", sans-serif;
    line-height: 1.4;
    min-height: 0;
}

.atk-auth-form__actions {
    margin-top: 24px;
}

.atk-auth-form__submit {
    width: 100%;
    height: 52px;
    font-size: 14px;
    letter-spacing: 0.10em;
}

/* Override Bootstrap5 ActiveForm has-success/has-error icons */
.atk-auth-form .form-control.is-invalid,
.atk-auth-form .form-control.is-valid {
    background-image: none;
    padding-right: 14px;
}

.atk-auth-form .form-control.is-invalid {
    border-color: var(--crimson);
}

.atk-auth-form .form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(255, 45, 89, 0.15);
}

/* --- Responsive --- */
@media (max-width: 960px) {
    .atk-auth {
        grid-template-columns: 1fr;
    }

    .atk-auth__brand {
        padding: 32px 28px;
        min-height: 280px;
    }

    .atk-auth__brand-title {
        font-size: clamp(48px, 12vw, 80px);
    }

    .atk-auth__brand-grid {
        display: none;
    }

    .atk-auth__main {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .atk-auth-card__title {
        font-size: 40px;
    }
}

/* Map loader overlay — спиннер поверх карты пока грузится Google Maps API
 * и AJAX-запрос точек. Показан по умолчанию (без класса is-hidden),
 * скрывается через .is-hidden из statistic.js после renderMapData(). */
.atk-map-wrap { position: relative; }
.atk-map-loader {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 10;
    transition: opacity 0.25s ease;
}
.atk-map-loader.is-hidden {
    opacity: 0;
    pointer-events: none;
}
.atk-map-loader__spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(132, 24, 254, 0.18);
    border-top-color: var(--violet, #8418FE);
    border-radius: 50%;
    animation: atk-map-spin 0.85s linear infinite;
}
.atk-map-loader__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink, #1A1F2A);
    letter-spacing: 0.02em;
}
@keyframes atk-map-spin {
    to { transform: rotate(360deg); }
}
