:root {
    --bg: #f4f2ed;
    --surface: #fbfaf7;
    --panel: #ffffff;
    --muted: #7f827d;
    --text: #161b18;
    --line: #dedbd2;
    --brand: #064639;
    --brand-deep: #033c31;
    --accent: #23a37d;
    --accent-soft: #e0f5ed;
    --danger: #df3f3f;
    --warning: #f0a124;
    --shadow: 0 20px 50px rgba(23, 27, 24, .08);
}

[data-theme="dark"] {
    --bg: #101512;
    --surface: #141a17;
    --panel: #1b231f;
    --muted: #a2aaa4;
    --text: #edf4ee;
    --line: #2b3832;
    --brand: #051f1a;
    --brand-deep: #041914;
    --accent: #37c89b;
    --accent-soft: #13382e;
    --shadow: 0 20px 50px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: "Inter", "Noto Sans Thai", sans-serif;
    background: var(--bg);
    color: var(--text);
}

button, input, select { font: inherit; }
button { cursor: pointer; }

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

.sidebar {
    position: sticky;
    top: 0;
    width: 272px;
    height: 100vh;
    flex: 0 0 272px;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
    color: #d7eee7;
    padding: 24px 14px;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px 26px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand strong {
    display: block;
    color: #effff8;
    font-size: 23px;
    letter-spacing: 0;
}

.brand span { display: block; color: #8cc3b1; font-size: 12px; margin-top: 2px; }

.nav-group { padding-top: 22px; }
.nav-group p { margin: 0 0 10px 6px; color: #76a99a; font-size: 11px; letter-spacing: .08em; }

.nav-item {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 13px;
    border: 0;
    border-radius: 8px;
    color: #b4d7cd;
    background: transparent;
    text-align: left;
    text-decoration: none;
    transition: .2s ease;
}

.nav-item:hover, .nav-item.active {
    background: #24a17a;
    color: #ffffff;
}

.nav-item svg { width: 18px; height: 18px; }
.nav-item b {
    margin-left: auto;
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    border-radius: 99px;
    background: #ff4e65;
    color: #fff;
    font-size: 12px;
}

.sidebar-user {
    margin-top: 22px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    background: rgba(255,255,255,.05);
}

.sidebar-user span {
    display: block;
    color: #8cc3b1;
    font-size: 11px;
}

.sidebar-user strong {
    display: block;
    margin-top: 3px;
    color: #effff8;
    font-size: 14px;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: #d7eee7;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

.logout-btn svg {
    width: 16px;
    height: 16px;
}

.workspace { flex: 1; min-width: 0; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 12;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.topbar-title { display: flex; align-items: center; gap: 14px; }
.topbar h1 { margin: 0; font-size: 18px; }
.topbar span { color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.language-switcher {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    padding: 0 34px 0 12px;
    font-weight: 800;
    font-size: 13px;
}

.icon-btn, .soft-btn, .primary-btn, .primary-lite-btn, .link-btn, .round-btn {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
}

.icon-btn { width: 42px; padding: 0; }
.menu-btn, .mobile-close { display: none; }
.soft-btn svg, .primary-btn svg, .primary-lite-btn svg, .icon-btn svg { width: 17px; height: 17px; }

.primary-btn {
    width: 100%;
    border: 0;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
}

.primary-lite-btn {
    border-color: transparent;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 800;
}

.link-btn {
    border: 0;
    color: var(--accent);
    background: transparent;
    font-weight: 700;
}

.content {
    max-width: 1250px;
    margin: 0 auto;
    padding: 24px 30px 40px;
}

.pill-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    background: #eeece5;
    margin-bottom: 22px;
}

[data-theme="dark"] .pill-tabs { background: #202a25; }

.tab {
    border: 0;
    border-radius: 8px;
    min-height: 36px;
    padding: 0 24px;
    background: transparent;
    color: var(--text);
    font-weight: 700;
}

.tab.active {
    background: var(--panel);
    box-shadow: 0 8px 18px rgba(0,0,0,.08);
}

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

.stat-card {
    min-height: 118px;
    border-radius: 8px;
    background: #efede7;
    padding: 18px;
}

[data-theme="dark"] .stat-card { background: #202722; }

.stat-card svg { width: 17px; color: var(--accent); }
.stat-card span, .stat-card small { display: block; color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin: 6px 0 2px; font-size: 29px; line-height: 1; }
.danger-card strong, .danger-card small { color: var(--danger); }

.alert-band {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 13px 16px;
    border-radius: 8px;
    border: 1px solid #f0a124;
    color: #734b06;
    background: #fff3df;
}

.alert-band[hidden],
.alert-band.is-empty {
    display: none !important;
}

[data-theme="dark"] .alert-band {
    background: #382b15;
    color: #ffd18c;
}

.view { display: none; }
.view.active { display: block; }

.grid-two {
    display: grid;
    grid-template-columns: minmax(320px, .95fr) minmax(420px, 1.25fr);
    gap: 18px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.panel h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 16px;
}

.panel h2 svg { width: 18px; color: var(--accent); }

.form-stack {
    display: grid;
    gap: 12px;
    padding: 20px;
}

label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.money-row {
    position: relative;
    display: grid;
    grid-template-columns: 118px 1fr;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: visible;
}

.money-row select, .money-row input, .money-row output, .currency-current {
    min-width: 0;
    border: 0;
    background: var(--surface);
    color: var(--text);
    min-height: 54px;
    padding: 0 14px;
    font-weight: 800;
}

.native-currency-select {
    display: none;
}

.currency-combo {
    position: relative;
    min-width: 0;
    border-right: 1px solid var(--line);
}

.currency-current {
    width: 100%;
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 10px;
}

.currency-current svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.currency-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(320px, 80vw);
    max-height: 330px;
    z-index: 40;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.currency-search {
    width: 100%;
    min-height: 38px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 11px;
    background: var(--surface);
    color: var(--text);
    outline: none;
}

.money-row .currency-search {
    min-height: 38px;
    border: 1px solid var(--line);
    font-weight: 600;
}

.swal2-html-container .native-currency-select {
    display: none !important;
}

.swal2-html-container .currency-combo {
    width: calc(100% - 2em);
    margin: 1em auto 3px;
    border-right: 0;
}

.swal2-html-container .currency-current {
    width: 100%;
    border: 1px solid #d9d9d9;
    border-radius: .1875em;
    justify-content: flex-start;
}

.swal2-html-container .currency-menu {
    width: 100%;
    text-align: left;
}

.currency-options {
    display: grid;
    max-height: 250px;
    overflow-y: auto;
}

.currency-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 9px 10px;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.currency-option:hover, .currency-option.selected {
    background: var(--accent-soft);
}

.currency-option span {
    min-width: 0;
}

.currency-option strong, .currency-option small {
    display: block;
}

.currency-option small {
    color: var(--muted);
    font-size: 11px;
}

.currency-empty {
    padding: 12px;
    color: var(--muted);
    text-align: center;
}

.money-row output { display: flex; align-items: center; color: var(--accent); font-size: 20px; }

.swap-line { display: grid; place-items: center; height: 32px; }
.round-btn {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 50%;
    color: var(--accent);
    background: var(--accent-soft);
    border: 0;
}

.mode-grid, .kyc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.check-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--surface);
    color: var(--muted);
}

.calc-result {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.calc-result div {
    padding: 13px;
    border-radius: 8px;
    background: var(--accent-soft);
}

.calc-result span { display: block; color: var(--muted); font-size: 12px; }
.calc-result strong { color: var(--accent); font-size: 18px; }

.kyc-grid input, .kyc-grid select {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    min-height: 42px;
    padding: 0 12px;
}

.kyc-upload-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
    border-radius: 12px;
    background: linear-gradient(135deg, var(--surface), var(--accent-soft));
}

.kyc-preview {
    min-height: 178px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    overflow: hidden;
    text-align: center;
}

.kyc-preview svg {
    width: 42px;
    height: 42px;
    color: var(--accent);
}

.kyc-preview span {
    color: var(--text);
    font-weight: 900;
}

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

.kyc-preview.has-image {
    min-height: 96px;
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    background: var(--accent-soft);
}

.kyc-preview.has-image span,
.kyc-preview.has-image small {
    color: var(--accent);
}

.kyc-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.kyc-thumb {
    position: relative;
    min-height: 110px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
}

.kyc-thumb img {
    width: 100%;
    height: 118px;
    display: block;
    object-fit: cover;
}

.kyc-thumb span {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(3, 60, 49, .82);
    color: #effff8;
    font-size: 12px;
    font-weight: 900;
}

.kyc-thumb em {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(35, 163, 125, .9);
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.kyc-remove {
    position: absolute;
    top: 7px;
    right: 7px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: rgba(3, 60, 49, .84);
    color: #effff8;
}

.kyc-remove svg {
    width: 16px;
    height: 16px;
}

.print-slip-btn,
.view-kyc-btn {
    min-height: 34px;
    padding: 0 10px;
    white-space: nowrap;
}

.print-slip-btn svg,
.view-kyc-btn svg {
    width: 15px;
    height: 15px;
}

.kyc-popup-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    text-align: left;
}

.kyc-popup-gallery a {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
}

.kyc-popup-gallery img {
    width: 100%;
    height: 240px;
    display: block;
    object-fit: cover;
}

.kyc-popup-gallery span {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(3, 60, 49, .86);
    color: #effff8;
    font-size: 12px;
    font-weight: 900;
}

.kyc-camera {
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #000;
}

.kyc-camera video {
    width: 100%;
    max-height: 300px;
    display: block;
    object-fit: cover;
}

.kyc-upload-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.kyc-upload-actions .soft-btn {
    flex: 1 1 130px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.fx-datatable {
    border-collapse: collapse !important;
}

.dataTables_wrapper {
    padding: 14px 16px 18px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--muted) !important;
    font-size: 13px;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    padding: 0 10px;
    margin-left: 8px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
    background: var(--panel) !important;
    color: var(--text) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    border-color: transparent !important;
    background: var(--accent) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    border-color: transparent !important;
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
}

table.dataTable.no-footer {
    border-bottom: 0 !important;
}

th, td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

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

td { font-size: 14px; }
.currency-cell { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.flag-chip {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 28px;
    height: 20px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 10px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

.flag-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.muted { color: var(--muted); font-size: 12px; }
.up { color: var(--accent); font-weight: 800; }
.down, .out { color: var(--danger); font-weight: 800; }
.low { color: var(--warning); font-weight: 800; }
.ok { color: var(--accent); font-weight: 800; }

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 20px;
}

.overview-dashboard {
    display: grid;
    grid-template-columns: minmax(360px, 1.05fr) minmax(360px, .95fr);
    gap: 18px;
    margin-bottom: 18px;
}

.total-stock-card {
    background: linear-gradient(135deg, #e4f6ef 0%, #f3f1ea 100%);
}

[data-theme="dark"] .total-stock-card {
    background: linear-gradient(135deg, #173a31 0%, #202722 100%);
}

.panel-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.stock-hero {
    display: grid;
    grid-template-columns: 1fr 180px;
    align-items: center;
    gap: 18px;
    padding: 24px;
}

.stock-hero span, .stock-hero small {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.stock-hero strong {
    display: block;
    margin: 10px 0 8px;
    color: var(--text);
    font-size: 38px;
    line-height: 1;
}

.stock-donut {
    position: relative;
    width: 168px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

.stock-donut::after {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line);
}

.stock-donut span {
    position: relative;
    z-index: 1;
    color: var(--accent);
    font-weight: 900;
    font-size: 24px;
}

.stock-bars {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.stock-bar-row {
    display: grid;
    grid-template-columns: minmax(145px, 1fr) minmax(130px, 1.3fr) 56px;
    align-items: center;
    gap: 12px;
}

.stock-bar-label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.stock-bar-label strong {
    font-size: 13px;
}

.stock-bar-label span {
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-bar-track {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--accent-soft);
}

.stock-bar-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.stock-bar-row b {
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.mini-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: var(--surface);
}

.mini-card span { color: var(--muted); font-size: 12px; }
.mini-card strong { display: block; margin-top: 8px; font-size: 22px; }

.stock-mini-card {
    display: grid;
    gap: 6px;
}

.mini-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.stock-mini-card small {
    color: var(--accent);
    font-weight: 800;
}

.popular-list { padding: 16px; display: grid; gap: 10px; }
.popular-item { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-radius: 8px; background: var(--surface); }

.empty-panel {
    padding: 42px 24px;
    text-align: center;
}

.empty-panel > svg { width: 46px; height: 46px; color: var(--accent); }
.empty-panel p { max-width: 650px; margin: 8px auto 0; color: var(--muted); }

.settings-form {
    display: grid;
    gap: 18px;
    padding: 20px;
}

.settings-copy {
    display: grid;
    gap: 4px;
}

.settings-copy strong {
    font-size: 16px;
}

.settings-copy span {
    color: var(--muted);
    font-size: 13px;
}

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

.settings-grid label {
    display: grid;
    gap: 8px;
}

.settings-grid input, .settings-grid select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: var(--surface);
    color: var(--text);
}

.settings-hint {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--accent-soft);
}

.settings-hint strong {
    color: var(--accent);
    font-size: 13px;
}

.settings-hint span {
    color: var(--muted);
    font-size: 12px;
}

.settings-submit {
    max-width: 240px;
}

.overlay { display: none; }

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #f4f2ed 0%, #e9efe9 52%, #dfe8e2 100%);
}

.auth-shell {
    width: min(1080px, 100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(340px, .95fr) minmax(360px, .9fr);
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(6, 70, 57, .18);
    background: var(--panel);
}

.register-shell {
    min-height: 720px;
}

.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px;
    color: #effff8;
    background:
        linear-gradient(145deg, rgba(6, 70, 57, .96), rgba(3, 60, 49, .98)),
        url("https://images.unsplash.com/photo-1565373677928-90e963765eac?auto=format&fit=crop&w=1200&q=80");
    background-size: cover;
    background-position: center;
}

.auth-brand strong {
    display: block;
    font-size: 28px;
}

.auth-brand span {
    display: block;
    margin-top: 4px;
    color: #9ed4c2;
    font-size: 13px;
}

.auth-market, .auth-feature-list {
    display: grid;
    gap: 12px;
}

.auth-market div, .auth-feature-list div {
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    padding: 16px;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(12px);
}

.auth-market span, .auth-market small {
    display: block;
    color: #9ed4c2;
    font-size: 12px;
}

.auth-market strong {
    display: block;
    margin: 7px 0 2px;
    font-size: 32px;
    line-height: 1;
}

.auth-feature-list div {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #effff8;
    font-weight: 700;
}

.auth-feature-list svg {
    width: 19px;
    height: 19px;
    color: #37c89b;
}

.auth-card {
    display: grid;
    align-content: center;
    gap: 24px;
    padding: 46px;
}

.auth-heading span {
    color: var(--accent);
    font-weight: 800;
    font-size: 13px;
}

.auth-heading h1 {
    margin: 6px 0 8px;
    font-size: 36px;
    line-height: 1.05;
}

.auth-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.auth-form {
    display: grid;
    gap: 14px;
}

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

.auth-form label {
    display: grid;
    gap: 8px;
}

.auth-form input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    background: var(--surface);
    color: var(--text);
    outline: none;
}

.auth-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(35, 163, 125, .12);
}

.auth-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.auth-switch a {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 980px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform .24s ease;
    }
    .sidebar.open { transform: translateX(0); }
    .overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.38);
        z-index: 15;
    }
    .menu-btn, .mobile-close { display: inline-flex; }
    .topbar { padding: 0 16px; }
    .topbar-actions .soft-btn span { display: none; }
    .language-switcher { max-width: 112px; padding-left: 10px; padding-right: 26px; }
    .content { padding: 18px 14px 32px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-two { grid-template-columns: 1fr; }
    .overview-dashboard { grid-template-columns: 1fr; }
    .overview-grid { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual { min-height: 330px; }
}

@media (max-width: 620px) {
    .topbar { height: auto; min-height: 66px; gap: 12px; align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
    .topbar-title { min-width: 0; }
    .topbar h1 { font-size: 16px; }
    .topbar-actions { margin-left: auto; gap: 8px; }
    .language-switcher { max-width: 92px; font-size: 12px; }
    .pill-tabs { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; }
    .tab { padding: 0 8px; }
    .stats-grid { grid-template-columns: 1fr; }
    .stock-hero { grid-template-columns: 1fr; }
    .stock-donut { width: min(180px, 100%); margin: 0 auto; }
    .stock-bar-row { grid-template-columns: 1fr; gap: 8px; }
    .stock-bar-row b { text-align: left; }
    .kyc-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mode-grid, .kyc-grid, .calc-result, .settings-grid { grid-template-columns: 1fr; }
    .money-row { grid-template-columns: 104px 1fr; }
    .auth-page { padding: 12px; }
    .auth-shell { min-height: 0; border-radius: 12px; }
    .auth-visual { min-height: 270px; padding: 24px; }
    .auth-card { padding: 28px 20px; }
    .auth-heading h1 { font-size: 30px; }
    .auth-form-grid { grid-template-columns: 1fr; }
}

@media print {
    .sidebar, .topbar, .pill-tabs, .stats-grid, .alert-band { display: none !important; }
    .content { max-width: none; padding: 0; }
    .panel { box-shadow: none; border-color: #ddd; }
}
