@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

@font-face {
    font-family:Lato;
    src:url("../fonts/lato-v16-latin-regular.woff2") format("woff2");
    font-weight:400;
    font-style:normal;
    font-display:swap;
}
@font-face {
    font-family:Lato;
    src:url("../fonts/lato-v16-latin-700.woff2") format("woff2");
    font-weight:700;
    font-style:normal;
    font-display:swap;
}
@font-face {
    font-family:Montserrat;
    src:url("../fonts/montserrat-v14-latin-600.woff2") format("woff2");
    font-weight:600 800;
    font-style:normal;
    font-display:swap;
}

* { box-sizing:border-box; }
html, body { min-height:100%; }
body {
    margin:0;
    background:#eef2f7;
    color:#697482;
    font-family:"Poppins",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    font-weight:400;
    -webkit-font-smoothing:antialiased;
}
button, input, textarea, select { font:inherit; }
button { cursor:pointer; }

:root {
    --ink:#0A0E27;
    --muted:#697482;
    --line:#d8dee7;
    --soft:#f6f8fb;
    --panel:#ffffff;
    --blue:#1565c0;
    --blue-soft:#eef5ff;
    --red:#dc2626;
    --red-soft:#fff1f1;
    --green:#047857;
    --green-soft:#ecfdf5;
    --amber:#b45309;
    --amber-soft:#fffbeb;
    --admin-heading-font:Montserrat,sans-serif;
    --admin-page-heading-size:20px;
    --admin-card-heading-size:14px;
    --admin-kicker-size:11px;
    --admin-container-gap:18px;
    --admin-panel-padding:16px;
}

body.is-locked {
    overflow:hidden;
}
body.is-locked .admin-shell {
    display:none;
}
body:not(.is-locked) .admin-login {
    display:none;
}
.admin-login {
    position:fixed;
    inset:0;
    z-index:900;
    min-height:100vh;
    display:grid;
    grid-template-columns:minmax(360px,440px) minmax(360px,500px);
    align-items:center;
    justify-content:center;
    gap:22px;
    padding:32px;
    background:
        radial-gradient(circle at 18% 18%, rgba(21,101,192,.12), transparent 30%),
        linear-gradient(135deg, #eef2f7 0%, #f8fafc 52%, #e9eef5 100%);
}
.admin-login-card,
.admin-login-side {
    border:1px solid var(--line);
    border-radius:10px;
    background:rgba(255,255,255,.92);
}
.admin-login-card {
    padding:32px;
    box-shadow:0 18px 55px rgba(15,23,42,.12);
}
.admin-login-brand {
    display:inline-flex;
    align-items:center;
    margin-bottom:28px;
}
.admin-login-brand img {
    display:block;
    width:158px;
    height:auto;
    object-fit:contain;
}
.admin-login-card h1 {
    margin:4px 0 8px;
    font-family:Montserrat,sans-serif;
    font-size:30px;
    font-weight:800;
    letter-spacing:0;
}
.admin-login-copy {
    margin:0 0 26px;
    max-width:330px;
    color:var(--muted);
    font-size:14px;
    line-height:1.55;
    font-weight:700;
}
.admin-login-form {
    display:grid;
    gap:16px;
}
.admin-login-input {
    height:46px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    overflow:hidden;
}
.admin-login-input:focus-within {
    border-color:var(--blue);
}
.admin-login-input input {
    min-width:0;
    width:100%;
    height:100%;
    border:0;
    outline:0;
    background:transparent;
    color:var(--ink);
    padding:0 13px;
    font-size:14px;
    font-weight:700;
}
.admin-login-input input::placeholder {
    color:#929dab;
}
.admin-login-input button {
    height:100%;
    border:0;
    border-left:1px solid var(--line);
    background:#f7f9fc;
    color:var(--blue);
    padding:0 14px;
    font-family:Montserrat,sans-serif;
    font-size:11px;
    font-weight:800;
}
.admin-login-input .admin-login-eye {
    width:48px;
    padding:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}
.admin-login-code {
    display:grid;
    gap:8px;
}
.admin-login-code[hidden] {
    display:none !important;
}
.admin-login-code label,
.admin-login-form > label {
    color:var(--ink);
    font-family:Montserrat,sans-serif;
    font-size:12px;
    font-weight:800;
}
.admin-login-code input {
    width:100%;
    height:46px;
    border:1px solid var(--line);
    border-radius:8px;
    outline:0;
    background:#fff;
    color:var(--ink);
    padding:0 13px;
    font-family:Montserrat,sans-serif;
    font-size:16px;
    font-weight:800;
    letter-spacing:2px;
}
.admin-login-code input:focus {
    border-color:var(--blue);
}
.admin-login-code input::placeholder {
    color:#929dab;
    letter-spacing:0;
}
.admin-login-error {
    min-height:17px;
    margin:6px 0 0;
    color:var(--red);
    font-size:12px;
    font-weight:700;
}
.admin-login-submit {
    min-height:46px;
    border:1px solid var(--blue);
    border-radius:8px;
    background:var(--blue);
    color:#fff;
    font-family:Montserrat,sans-serif;
    font-size:13px;
    font-weight:800;
}
.admin-login-submit:hover {
    background:#0f56a6;
}
.admin-login-side {
    min-height:420px;
    padding:28px;
    display:grid;
    align-content:space-between;
    gap:32px;
    background:
        linear-gradient(145deg, rgba(10,14,39,.97), rgba(18,31,48,.95)),
        #0A0E27;
    color:#fff;
    border-color:#263244;
}
.admin-login-side h2 {
    margin:5px 0 8px;
    font-family:Montserrat,sans-serif;
    font-size:24px;
    font-weight:800;
}
.admin-login-side p {
    margin:0;
    color:#b9c4d2;
    font-size:14px;
    line-height:1.55;
    font-weight:700;
}
.admin-login-checks {
    border:1px solid #334155;
    border-radius:8px;
    display:grid;
    grid-template-columns:124px minmax(0,1fr);
    overflow:hidden;
}
.admin-login-checks span,
.admin-login-checks strong {
    border-bottom:1px solid #334155;
    padding:12px 13px;
    font-size:12px;
    line-height:1.35;
}
.admin-login-checks span {
    color:#8fa1b7;
    font-family:Montserrat,sans-serif;
    font-weight:800;
    text-transform:uppercase;
}
.admin-login-checks strong {
    color:#fff;
    font-weight:800;
    font-size:12.5px;
}
.admin-login-checks span:nth-last-child(-n+2),
.admin-login-checks strong:nth-last-child(-n+2) {
    border-bottom:0;
}

.admin-shell {
    height:100vh;
    min-height:760px;
    display:grid;
    grid-template-columns:248px minmax(0,1fr);
    overflow:hidden;
}
.admin-sidebar {
    min-height:0;
    background:#fff;
    border-right:1px solid var(--line);
    display:flex;
    flex-direction:column;
    padding:18px 14px;
    overflow:hidden;
}
.admin-brand {
    height:42px;
    display:flex;
    align-items:center;
    padding:0 10px;
    margin-bottom:14px;
    text-decoration:none;
}
.admin-brand img {
    display:block;
    width:142px;
    height:auto;
    object-fit:contain;
}
.admin-role-card {
    border:1px solid var(--line);
    background:var(--soft);
    border-radius:8px;
    padding:12px;
    margin-bottom:14px;
    display:grid;
    gap:3px;
}
.admin-role-card .role-kicker,
.admin-eyebrow,
.section-kicker {
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:700;
    color:#7b8592;
    text-transform:uppercase;
    letter-spacing:.04em;
}
.admin-role-card strong {
    font-family:Montserrat,sans-serif;
    font-size:13px;
}
.admin-role-card span:last-child {
    color:var(--green);
    font-size:12px;
    font-weight:700;
}
.admin-nav {
    min-height:0;
    overflow-y:auto;
    padding-right:3px;
    display:grid;
    gap:2px;
}
.admin-nav::-webkit-scrollbar,
.admin-content::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.chat-thread::-webkit-scrollbar,
.side-detail::-webkit-scrollbar {
    width:8px;
    height:8px;
}
.admin-nav::-webkit-scrollbar-thumb,
.admin-content::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.chat-thread::-webkit-scrollbar-thumb,
.side-detail::-webkit-scrollbar-thumb {
    background:#b8c2cf;
    border-radius:999px;
}
.admin-nav button {
    width:100%;
    min-height:38px;
    border:0;
    border-radius:7px;
    background:transparent;
    color:#5f6b77;
    padding:0 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    font-family:Montserrat,sans-serif;
    font-size:12px;
    font-weight:700;
    text-align:left;
}
.admin-nav button:hover { background:#f4f7fb; color:var(--ink); }
.admin-nav button.active {
    background:var(--blue-soft);
    color:var(--blue);
}
.admin-workspace {
    min-width:0;
    min-height:0;
    display:grid;
    grid-template-rows:76px minmax(0,1fr);
}
.admin-topbar {
    min-width:0;
    background:#fff;
    border-bottom:1px solid var(--line);
    display:grid;
    grid-template-columns:auto minmax(300px,520px) auto;
    align-items:center;
    gap:18px;
    padding:0 22px;
}
.admin-topbar h1 {
    margin:2px 0 0;
    font-family:Montserrat,sans-serif;
    font-size:22px;
    font-weight:800;
    letter-spacing:0;
}
.admin-eyebrow { margin:0; }
.admin-command {
    height:40px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    display:grid;
    grid-template-columns:26px minmax(0,1fr);
    align-items:center;
    padding:0 12px;
}
.admin-command:focus-within { border-color:var(--blue); }
.admin-command span {
    color:#9aa4b2;
    font-family:Montserrat,sans-serif;
    font-weight:800;
}
.admin-command input {
    min-width:0;
    width:100%;
    height:100%;
    border:0;
    outline:0;
    color:var(--ink);
    background:transparent;
    font-size:13px;
    font-weight:700;
}
.admin-command input::placeholder { color:#8a95a4; font-weight:600; }
.admin-top-actions {
    justify-self:end;
    display:flex;
    align-items:center;
    gap:10px;
}
.live-pill {
    height:30px;
    border:1px solid #b7e4cf;
    border-radius:999px;
    background:var(--green-soft);
    color:var(--green);
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:0 10px;
    font-family:Montserrat,sans-serif;
    font-size:11px;
    font-weight:800;
}
.live-pill span {
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--green);
}
.top-action,
.icon-button,
.ghost-button,
.danger-button,
.primary-button,
.mini-button,
.center-button {
    min-height:34px;
    border:1px solid var(--line);
    border-radius:7px;
    background:#fff;
    color:var(--ink);
    padding:0 12px;
    font-family:Montserrat,sans-serif;
    font-size:12px;
    font-weight:700;
}
.top-action:hover,
.ghost-button:hover,
.mini-button:hover,
.center-button:hover { background:#f5f7fa; }
.top-action.primary,
.primary-button {
    border-color:var(--blue);
    background:var(--blue);
    color:#fff;
}
.danger-button {
    border-color:#efb4b4;
    color:var(--red);
    background:var(--red-soft);
}
.admin-avatar {
    width:38px;
    height:38px;
    border-radius:50%;
    background:var(--ink);
    color:#fff;
    display:grid;
    place-items:center;
    font-family:Montserrat,sans-serif;
    font-weight:800;
}
.admin-content {
    min-height:0;
    overflow:auto;
    padding:22px;
}
.admin-content:focus {
    outline:0;
}
.view-grid {
    display:grid;
    gap:16px;
}
.view-grid.two { grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr); align-items:start; }
.view-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.kpi-grid {
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:12px;
}
.kpi-grid.compact {
    grid-template-columns:repeat(4,minmax(0,1fr));
}
.kpi-card,
.panel,
.table-panel,
.detail-panel,
.chat-panel,
.report-card {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
}
.kpi-card {
    padding:14px;
    display:grid;
    gap:8px;
}
.kpi-card span,
.muted,
.table-sub,
.tiny-text {
    color:var(--muted);
}
.kpi-card span {
    font-family:Montserrat,sans-serif;
    font-size:10px;
    text-transform:uppercase;
    font-weight:800;
}
.kpi-card strong {
    font-size:22px;
    font-weight:800;
    font-variant-numeric:tabular-nums;
}
.kpi-card small { color:var(--green); font-weight:700; }
.kpi-card.warn small { color:var(--amber); }
.kpi-card.danger small { color:var(--red); }
.panel,
.table-panel,
.detail-panel,
.chat-panel {
    min-width:0;
    overflow:hidden;
}
.panel-head {
    min-height:54px;
    border-bottom:1px solid var(--line);
    padding:12px 14px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.panel-head h2,
.panel-head h3 {
    margin:0;
    font-family:Montserrat,sans-serif;
    font-size:14px;
    font-weight:800;
}
.panel-head p {
    margin:2px 0 0;
    color:var(--muted);
    font-size:12px;
}
.panel-body { padding:14px; }
.toolbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px;
}
.notice-strip {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:12px 14px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
}
.notice-strip strong {
    font-family:Montserrat,sans-serif;
    font-size:13px;
    font-weight:800;
}
.notice-strip span {
    color:var(--muted);
    font-size:13px;
    font-weight:700;
}
.notice-strip.green {
    border-color:#b7e4cf;
    background:var(--green-soft);
}
.notice-strip.amber {
    border-color:#f4d38b;
    background:var(--amber-soft);
}
.filter-row {
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}
.input,
.select,
.textarea {
    width:100%;
    min-width:0;
    border:1px solid var(--line);
    border-radius:7px;
    background:#fff;
    color:var(--ink);
    min-height:36px;
    padding:0 11px;
    outline:0;
    font-size:13px;
    font-weight:700;
}
.input:focus,
.select:focus,
.textarea:focus { border-color:var(--blue); }
.textarea {
    min-height:90px;
    padding:10px 11px;
    resize:vertical;
}
.table-wrap {
    width:100%;
    overflow:auto;
}
table {
    width:100%;
    border-collapse:collapse;
    min-width:760px;
}
th {
    height:36px;
    background:#f3f6fa;
    border-bottom:1px solid var(--line);
    color:#6f7a86;
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:800;
    text-align:left;
    text-transform:uppercase;
    padding:0 12px;
    white-space:nowrap;
}
td {
    height:46px;
    border-bottom:1px solid #edf0f4;
    padding:0 12px;
    color:var(--ink);
    font-size:13px;
    font-weight:700;
    vertical-align:middle;
    white-space:nowrap;
}
td.num,
th.num { text-align:right; font-variant-numeric:tabular-nums; }
tr:hover td { background:#fbfcfe; }
tr.selected-row td {
    background:#f3f8ff;
}
.table-action-row {
    display:flex;
    justify-content:flex-end;
    gap:6px;
}
.badge {
    min-height:24px;
    border-radius:999px;
    padding:4px 8px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
}
.badge.green { background:var(--green-soft); color:var(--green); }
.badge.red { background:var(--red-soft); color:var(--red); }
.badge.amber { background:var(--amber-soft); color:var(--amber); }
.badge.blue { background:var(--blue-soft); color:var(--blue); }
.badge.gray { background:#eef1f5; color:#65707d; }
.text-green { color:var(--green) !important; }
.text-red { color:var(--red) !important; }
.text-blue { color:var(--blue) !important; }
.split-layout {
    display:grid;
    grid-template-columns:minmax(0,1fr) 430px;
    gap:16px;
    align-items:start;
}
.side-detail {
    max-height:calc(100vh - 120px);
    overflow:auto;
    position:sticky;
    top:0;
}
.user-card-head {
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}
.user-avatar {
    width:52px;
    height:52px;
    border-radius:12px;
    background:var(--ink);
    color:#fff;
    display:grid;
    place-items:center;
    font-family:Montserrat,sans-serif;
    font-weight:800;
    flex:0 0 auto;
}
.user-card-head h2 {
    margin:3px 0 5px;
    font-family:Montserrat,sans-serif;
    font-size:18px;
    font-weight:800;
}
.user-card-head p {
    margin:0;
    color:var(--muted);
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
}
.user-stat-grid {
    border-bottom:1px solid var(--line);
    padding:12px 14px;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
}
.user-stat {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:11px;
    display:grid;
    gap:4px;
}
.user-stat span {
    color:var(--muted);
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
}
.user-stat strong {
    font-size:17px;
    font-weight:800;
    font-variant-numeric:tabular-nums;
}
.user-stat small {
    color:var(--muted);
    font-size:11px;
    font-weight:700;
}
.user-stat.green { border-color:#b7e4cf; background:var(--green-soft); }
.user-stat.red { border-color:#efb4b4; background:var(--red-soft); }
.user-stat.blue { border-color:#bfdbfe; background:var(--blue-soft); }
.user-row-select {
    width:100%;
    border:0;
    background:transparent;
    color:var(--ink);
    padding:0;
    display:flex;
    align-items:center;
    gap:10px;
    text-align:left;
    cursor:pointer;
}
.user-row-select strong {
    display:block;
    font-size:13px;
    font-weight:800;
}
.user-row-select small {
    display:block;
    margin-top:2px;
    color:var(--muted);
    font-size:11px;
    font-weight:700;
}
.user-mini-avatar {
    width:34px;
    height:34px;
    border-radius:9px;
    background:#111827;
    color:#fff;
    display:grid;
    place-items:center;
    font-family:Montserrat,sans-serif;
    font-size:11px;
    font-weight:800;
    flex:0 0 auto;
}
.country-pill {
    min-width:34px;
    min-height:24px;
    border:1px solid var(--line);
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:800;
}
.status-stack {
    display:flex;
    align-items:center;
    gap:5px;
    flex-wrap:wrap;
}
.user-risk-cell {
    min-width:120px;
    display:grid;
    gap:6px;
}
.user-risk-cell strong {
    font-family:Montserrat,sans-serif;
    font-size:12px;
    font-weight:800;
}
.risk-meter {
    width:100%;
    height:7px;
    border-radius:999px;
    background:#eef1f5;
    overflow:hidden;
}
.risk-meter span {
    display:block;
    height:100%;
    border-radius:999px;
}
.risk-meter.risk-low span { background:var(--green); }
.risk-meter.risk-medium span { background:var(--amber); }
.risk-meter.risk-high span { background:var(--red); }
.user-detail-hero {
    border-bottom:1px solid var(--line);
    background:#fbfcfe;
    padding:14px;
    display:grid;
    grid-template-columns:minmax(0,1fr) 126px;
    gap:12px;
    align-items:center;
}
.risk-score-card {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:11px;
    display:grid;
    gap:6px;
}
.risk-score-card span {
    color:var(--muted);
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
}
.risk-score-card strong {
    font-family:Montserrat,sans-serif;
    font-size:24px;
    font-weight:800;
    line-height:1;
}
.risk-score-card.risk-low { border-color:#b7e4cf; }
.risk-score-card.risk-medium { border-color:#f4d38b; }
.risk-score-card.risk-high { border-color:#efb4b4; }
.user-finance-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}
.user-health-card,
.user-section,
.user-action-deck {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:12px;
}
.user-health-card {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
}
.user-health-card > div {
    display:grid;
    gap:3px;
}
.user-health-card span {
    color:var(--muted);
    font-size:11px;
    font-weight:800;
}
.user-health-card strong {
    font-family:Montserrat,sans-serif;
    font-size:15px;
    font-weight:800;
}
.user-health-card .risk-meter {
    grid-column:1 / -1;
}
.user-section {
    display:grid;
    gap:10px;
}
.user-access-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
}
.user-access-grid > div {
    border:1px solid var(--line);
    border-radius:8px;
    padding:0 10px;
    background:#fbfcfe;
}
.user-action-deck {
    display:grid;
    gap:12px;
}
.detail-list {
    display:grid;
    gap:8px;
}
.detail-row,
.timeline-row,
.risk-row,
.permission-row {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    align-items:center;
    border-bottom:1px solid #edf0f4;
    padding:9px 0;
}
.detail-row:last-child,
.timeline-row:last-child,
.risk-row:last-child,
.permission-row:last-child { border-bottom:0; }
.detail-row span,
.timeline-row span,
.risk-row span,
.permission-row span {
    color:var(--muted);
    font-size:12px;
}
.timeline {
    display:grid;
    gap:0;
}
.timeline-row > div {
    min-width:0;
    display:grid;
    gap:3px;
}
.timeline-row > div strong,
.timeline-row > div span {
    display:block;
}
.timeline-row strong { font-size:13px; }
.action-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}
.wide-action { grid-column:1 / -1; }
.metric-strip {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
}
.metric {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:11px;
}
.metric span {
    display:block;
    color:var(--muted);
    font-size:12px;
}
.metric strong {
    display:block;
    margin-top:4px;
    font-size:18px;
    font-variant-numeric:tabular-nums;
}
.funds-create {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
}
.funds-create strong {
    display:block;
    margin-bottom:4px;
    font-family:Montserrat,sans-serif;
    font-size:15px;
    font-weight:800;
}
.funds-create span {
    color:var(--muted);
    font-size:13px;
    font-weight:700;
    line-height:1.45;
}
.risk-list,
.alert-list,
.key-list,
.setting-list {
    display:grid;
    gap:8px;
}
.alert-item {
    border:1px solid var(--line);
    border-left:3px solid var(--amber);
    border-radius:8px;
    padding:11px;
    display:grid;
    gap:4px;
}
.alert-item.high { border-left-color:var(--red); }
.alert-item.ok { border-left-color:var(--green); }
.chat-shell {
    display:grid;
    grid-template-columns:minmax(260px,320px) minmax(0,1fr);
    gap:16px;
    min-width:0;
}
.chat-list {
    display:grid;
    gap:8px;
}
.chat-item {
    width:100%;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:10px;
    display:grid;
    gap:4px;
    text-align:left;
}
.chat-item.active {
    border-color:var(--blue);
    background:var(--blue-soft);
}
.chat-item strong { font-size:13px; }
.chat-item span { color:var(--muted); font-size:12px; }
.chat-thread {
    height:420px;
    overflow:auto;
    padding:14px;
    background:#f7f9fc;
    display:grid;
    align-content:start;
    gap:9px;
    min-width:0;
}
.support-client-card {
    border-bottom:1px solid var(--line);
    background:#fbfcfe;
    padding:10px 14px;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
}
.support-client-card div {
    min-width:0;
    border:1px solid #e3e8f0;
    border-radius:8px;
    background:#fff;
    padding:9px 10px;
    display:grid;
    gap:3px;
}
.support-client-card span {
    color:var(--muted);
    font-family:Montserrat,sans-serif;
    font-size:9px;
    font-weight:900;
    line-height:1;
    text-transform:uppercase;
}
.support-client-card strong {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:var(--ink);
    font-size:12px;
    font-weight:800;
}
.message {
    max-width:78%;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:9px 11px;
    font-size:13px;
    line-height:1.35;
    overflow-wrap:anywhere;
}
.message-text {
    white-space:pre-wrap;
}
.message.admin {
    justify-self:end;
    background:var(--blue);
    border-color:var(--blue);
    color:#fff;
}
.message.system {
    justify-self:center;
    max-width:86%;
    border-color:#d9e0e8;
    background:#eef3f8;
    color:#607085;
    text-align:center;
    font-size:12px;
    font-weight:700;
}
.message-agent {
    margin-bottom:4px;
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:800;
    letter-spacing:0;
}
.message.admin .message-agent,
.message.admin .tiny-text {
    color:rgba(255,255,255,.78);
}
.message-send-state {
    margin-top:6px;
    color:rgba(255,255,255,.82);
    font-size:11px;
    font-weight:800;
}
.message-send-state.failed {
    color:#ffe2e2;
}
.message-action-row {
    margin:-2px -3px 6px auto;
    display:flex;
    justify-content:flex-end;
    gap:5px;
}
.message-action-row button {
    border:1px solid rgba(255,255,255,.32);
    border-radius:999px;
    background:rgba(255,255,255,.14);
    color:#fff;
    padding:4px 8px;
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:800;
    line-height:1;
}
.message-action-row button:hover {
    background:rgba(255,255,255,.24);
}
.chat-compose {
    border-top:1px solid var(--line);
    padding:12px;
    display:grid;
    grid-template-columns:minmax(220px,1fr) auto auto;
    gap:8px;
    align-items:end;
    min-width:0;
}
.support-thread-actions {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
}
.support-hold-button {
    min-height:38px;
    border:1px solid #d5dce7;
    border-radius:8px;
    background:#fff;
    color:var(--ink);
    padding:6px 12px;
    display:grid;
    gap:1px;
    align-content:center;
    cursor:pointer;
    text-align:left;
    transition:border-color .16s ease, background .16s ease, color .16s ease;
}
.support-hold-button span {
    color:var(--muted);
    font-family:Montserrat,sans-serif;
    font-size:9px;
    font-weight:900;
    line-height:1;
    text-transform:uppercase;
}
.support-hold-button strong {
    font-size:12px;
    font-weight:900;
    line-height:1.1;
}
.support-hold-button:hover {
    border-color:var(--amber);
    background:var(--amber-soft);
}
.support-hold-button.resume {
    border-color:#b7e4cf;
    background:var(--green-soft);
}
.support-compose-field {
    display:grid;
    gap:7px;
    min-width:0;
}
.support-compose-field textarea {
    min-height:54px;
    max-height:180px;
    resize:vertical;
    line-height:1.45;
}
.support-file-input {
    display:none;
}
.support-attach-button {
    min-height:46px;
}
.support-file-list {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
}
.support-file-list span {
    max-width:220px;
    border:1px solid var(--line);
    border-radius:999px;
    background:#fff;
    padding:5px 8px;
    color:var(--ink);
    font-size:11px;
    font-weight:800;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.support-file-list small {
    color:var(--muted);
    font-weight:700;
}
.support-attachments {
    display:grid;
    gap:6px;
    margin-top:7px;
}
.support-attachment-chip {
    min-width:220px;
    max-width:320px;
    border:1px solid var(--line);
    border-radius:8px;
    background:rgba(255,255,255,.84);
    color:var(--ink);
    text-decoration:none;
    padding:8px;
    display:grid;
    grid-template-columns:36px minmax(0,1fr);
    column-gap:8px;
    row-gap:2px;
}
.message.admin .support-attachment-chip {
    border-color:rgba(255,255,255,.32);
    background:rgba(255,255,255,.14);
    color:#fff;
}
.support-attachment-chip span {
    grid-row:1 / span 2;
    width:36px;
    height:34px;
    border-radius:7px;
    background:#eef3f8;
    color:var(--blue);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:10px;
    font-weight:900;
}
.message.admin .support-attachment-chip span {
    background:rgba(255,255,255,.2);
    color:#fff;
}
.support-attachment-chip strong,
.support-attachment-chip small {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.support-attachment-chip strong {
    font-size:12px;
}
.support-attachment-chip small {
    color:var(--muted);
    font-size:11px;
    font-weight:700;
}
.message.admin .support-attachment-chip small {
    color:rgba(255,255,255,.76);
}
.notifications-panel .panel-body {
    padding:0;
}
.notification-list {
    display:grid;
}
.notification-item {
    min-width:0;
    border-bottom:1px solid var(--line);
    padding:14px;
    display:grid;
    grid-template-columns:44px minmax(0,1fr) auto;
    gap:12px;
    align-items:center;
    background:#fff;
}
.notification-item:last-child {
    border-bottom:0;
}
.notification-icon {
    width:40px;
    height:40px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#f6f8fb;
    color:var(--ink);
    display:flex;
    align-items:center;
    justify-content:center;
    font-family:Montserrat,sans-serif;
    font-size:12px;
    font-weight:900;
}
.notification-item.blue .notification-icon { background:var(--blue-soft); border-color:#cfe2ff; color:var(--blue); }
.notification-item.amber .notification-icon { background:var(--amber-soft); border-color:#f3d8aa; color:var(--amber); }
.notification-item.red .notification-icon { background:var(--red-soft); border-color:#fecaca; color:var(--red); }
.notification-item.green .notification-icon { background:var(--green-soft); border-color:#bbf7d0; color:var(--green); }
.notification-row {
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}
.notification-row > span {
    color:var(--muted);
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:900;
    text-transform:uppercase;
}
.notification-item h3 {
    margin:5px 0 3px;
    color:var(--ink);
    font-family:Montserrat,sans-serif;
    font-size:14px;
    line-height:1.25;
}
.notification-item p {
    margin:0;
    color:#5e6a7a;
    font-size:13px;
    line-height:1.45;
}
.notification-item small {
    display:block;
    margin-top:5px;
    color:var(--muted);
    font-size:11px;
    font-weight:700;
}
.mailbox-layout {
    display:grid;
    grid-template-columns:minmax(0,1fr) 420px;
    gap:16px;
    align-items:start;
}
.mailbox-compose {
    display:grid;
    gap:12px;
}
.mailbox-message {
    min-height:140px;
}
.mailbox-actions {
    display:flex;
    justify-content:flex-end;
    gap:8px;
}
.mail-preview-panel {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    overflow:hidden;
}
.mail-preview-header {
    min-height:54px;
    border-bottom:1px solid var(--line);
    padding:12px 14px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}
.mail-preview-header span {
    color:var(--muted);
    font-size:12px;
    font-weight:700;
}
.mail-preview-header strong {
    font-family:Montserrat,sans-serif;
    font-size:14px;
    font-weight:800;
}
.mail-html-card {
    margin:14px;
    border:1px solid #e8e5e0;
    border-radius:14px;
    background:#fff;
    overflow:hidden;
}
.mail-html-top {
    background:var(--ink);
    color:#fff;
    padding:18px;
    display:grid;
    gap:6px;
}
.mail-html-top strong {
    font-family:Montserrat,sans-serif;
    font-size:20px;
    font-weight:800;
}
.mail-html-top span {
    color:#b0a898;
    font-size:12px;
    font-weight:700;
}
.mail-html-card h2 {
    margin:0;
    padding:20px 18px 4px;
    font-family:Montserrat,sans-serif;
    font-size:21px;
    line-height:1.25;
}
.mail-html-body {
    padding:8px 18px 4px;
    display:grid;
    gap:10px;
}
.mail-html-body p {
    margin:0;
    color:#3f3a34;
    font-size:14px;
    line-height:1.55;
}
.mail-html-cta {
    margin:16px 18px 4px;
    min-height:38px;
    border-radius:8px;
    padding:0 16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:var(--blue);
    color:#fff;
    font-family:Montserrat,sans-serif;
    font-size:12px;
    font-weight:800;
    text-decoration:none;
}
.mail-html-footer {
    margin-top:18px;
    border-top:1px solid #e8e5e0;
    padding:14px 18px;
    color:#8a7e6e;
    font-size:11px;
    line-height:1.45;
}
.mail-preview-modal {
    max-width:680px;
    margin:0 auto 14px;
}
.mail-html-code {
    min-height:180px;
    font-family:Consolas,monospace;
    font-size:11px;
    font-weight:600;
}
.report-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
}
.report-card {
    padding:14px;
    display:grid;
    gap:10px;
}
.report-card h3 {
    margin:0;
    font-family:Montserrat,sans-serif;
    font-size:14px;
}
.report-card p {
    margin:0;
    color:var(--muted);
    font-size:13px;
    line-height:1.45;
}
.scope-list {
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}
.permission-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
}
.permission-card {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:12px;
}
.permission-card h3 {
    margin:0 0 8px;
    font-family:Montserrat,sans-serif;
    font-size:13px;
}
.permission-copy {
    margin:0 0 10px;
    color:var(--muted);
    font-size:12px;
    font-weight:700;
    line-height:1.4;
}
.permission-editor {
    display:grid;
    gap:14px;
}
.permission-toggle-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}
.permission-toggle-row {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:12px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:12px;
    align-items:center;
    cursor:pointer;
}
.permission-toggle-row input {
    position:absolute;
    opacity:0;
    pointer-events:none;
}
.permission-toggle-copy {
    display:grid;
    gap:4px;
}
.permission-toggle-copy strong {
    font-family:Montserrat,sans-serif;
    font-size:13px;
    font-weight:800;
}
.permission-toggle-copy small {
    color:var(--muted);
    font-size:12px;
    font-weight:700;
    line-height:1.35;
}
.toggle-visual {
    width:40px;
    height:23px;
    border:1px solid #c6ceda;
    border-radius:999px;
    background:#e8ecf2;
    position:relative;
}
.toggle-visual::after {
    content:"";
    position:absolute;
    top:2px;
    left:2px;
    width:17px;
    height:17px;
    border-radius:50%;
    background:#fff;
    transition:left .16s ease;
}
.permission-toggle-row input:checked + .permission-toggle-copy + .toggle-visual {
    background:var(--blue);
    border-color:var(--blue);
}
.permission-toggle-row input:checked + .permission-toggle-copy + .toggle-visual::after {
    left:19px;
}
.generated-key {
    display:grid;
    gap:12px;
}
.generated-key > span {
    color:var(--muted);
    font-size:13px;
    font-weight:700;
}
.generated-key code {
    border:1px solid var(--line);
    border-radius:8px;
    background:#f6f8fb;
    color:var(--ink);
    padding:13px;
    display:block;
    font-family:Montserrat,sans-serif;
    font-size:13px;
    font-weight:800;
    word-break:break-all;
}
.toggle {
    width:38px;
    height:22px;
    border:1px solid #c6ceda;
    border-radius:999px;
    background:#e8ecf2;
    position:relative;
}
.toggle::after {
    content:"";
    position:absolute;
    top:2px;
    left:2px;
    width:16px;
    height:16px;
    border-radius:50%;
    background:#fff;
    transition:left .16s ease;
}
.toggle.active {
    background:var(--blue);
    border-color:var(--blue);
}
.toggle.active::after { left:18px; }
.modal-layer {
    position:fixed;
    inset:0;
    background:rgba(10,14,39,.38);
    display:none;
    align-items:center;
    justify-content:center;
    padding:24px;
    z-index:1000;
}
.modal-layer.visible { display:flex; }
.modal-card {
    width:min(720px,100%);
    max-height:calc(100vh - 48px);
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
}
.modal-layer.wide-modal .modal-card {
    width:min(1040px,calc(100vw - 32px));
}
.modal-head {
    min-height:68px;
    border-bottom:1px solid var(--line);
    padding:14px 16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
}
.modal-head p { margin:0 0 3px; color:var(--muted); font-size:11px; font-family:Montserrat,sans-serif; text-transform:uppercase; font-weight:800; }
.modal-head h2 {
    margin:0;
    font-family:Montserrat,sans-serif;
    font-size:17px;
}
.modal-body {
    max-height:calc(100vh - 136px);
    overflow-y:auto;
    overflow-x:hidden;
    padding:16px;
    display:grid;
    gap:12px;
}
.form-grid {
    display:grid;
    gap:10px;
}
.form-grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.form-field {
    min-width:0;
    display:grid;
    gap:6px;
}
.form-field label {
    font-family:Montserrat,sans-serif;
    font-size:11px;
    font-weight:800;
    color:var(--ink);
}
.field-helper {
    color:var(--muted);
    font-size:12px;
    font-weight:700;
}
.field-helper.error {
    color:var(--red);
}
.banner-spec-card {
    border:1px solid var(--line);
    border-radius:8px;
    background:#f8fafc;
    padding:14px;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin-bottom:14px;
}
.banner-spec-card div {
    border:1px solid #e4e9f1;
    border-radius:7px;
    background:#fff;
    padding:11px 12px;
    display:grid;
    gap:4px;
}
.banner-spec-card span,
.banner-modal-guide span,
.banner-order {
    color:var(--muted);
    font-size:12px;
    font-weight:700;
}
.banner-spec-card strong,
.banner-modal-guide strong {
    font-family:Montserrat,sans-serif;
    font-size:15px;
    font-weight:800;
    color:var(--ink);
}
.banner-spec-card p {
    grid-column:1 / -1;
    margin:0;
    color:var(--muted);
    font-size:13px;
    font-weight:700;
    line-height:1.55;
}
.admin-banner-list {
    display:grid;
    gap:12px;
}
.admin-banner-card {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:12px;
    display:grid;
    grid-template-columns:minmax(280px,42%) minmax(0,1fr) auto;
    gap:14px;
    align-items:center;
}
.admin-banner-preview {
    width:100%;
    aspect-ratio:9.6 / 1;
    border:1px solid #e3e7ee;
    border-radius:7px;
    overflow:hidden;
    background:#e8eaed;
}
.admin-banner-preview img {
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}
.promo-preview-fallback {
    width:100%;
    height:100%;
    padding:12px 18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    background:linear-gradient(90deg,#e8eaed,#f7f8fa);
}
.promo-preview-fallback span,
.banner-pill {
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    background:#eef4ff;
    color:var(--blue);
    padding:5px 9px;
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.3px;
}
.promo-preview-fallback strong {
    font-family:Montserrat,sans-serif;
    font-size:14px;
    color:var(--ink);
}
.admin-banner-info {
    min-width:0;
    display:grid;
    gap:6px;
}
.admin-banner-info > div {
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}
.admin-banner-info h3 {
    margin:0;
    font-family:Montserrat,sans-serif;
    font-size:15px;
    font-weight:800;
    color:var(--ink);
}
.admin-banner-info p {
    margin:0;
    color:var(--muted);
    font-size:13px;
    line-height:1.5;
    font-weight:700;
}
.admin-banner-info small {
    color:#657084;
    font-size:12px;
    font-weight:800;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.admin-banner-actions {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
}
.banner-modal-guide {
    border:1px solid #dce5f2;
    border-radius:8px;
    background:#f6f9ff;
    padding:12px 14px;
    margin-bottom:12px;
    display:grid;
    gap:4px;
}
.checkbox-row {
    min-height:36px;
    border:1px solid var(--line);
    border-radius:7px;
    background:#fff;
    padding:0 11px;
    display:flex;
    align-items:center;
    gap:8px;
    color:var(--ink);
}
.checkbox-row input {
    width:16px;
    height:16px;
    accent-color:var(--blue);
}
.user-search-field {
    position:relative;
}
.user-search-results {
    position:absolute;
    left:0;
    right:0;
    top:calc(100% + 6px);
    z-index:30;
    display:none;
    max-height:268px;
    overflow:auto;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    box-shadow:0 16px 38px rgba(10,14,39,.14);
    padding:6px;
}
.user-search-results.open {
    display:grid;
    gap:4px;
}
.user-search-option {
    width:100%;
    border:0;
    border-radius:7px;
    background:#fff;
    color:var(--ink);
    padding:9px 10px;
    text-align:left;
    display:grid;
    gap:2px;
    cursor:pointer;
}
.user-search-option:hover,
.user-search-option:focus-visible {
    background:var(--blue-soft);
    outline:0;
}
.user-search-option strong {
    font-size:13px;
    font-weight:800;
}
.user-search-option span,
.user-search-option small,
.user-search-empty {
    color:var(--muted);
    font-size:12px;
    font-weight:700;
}
.user-search-option small {
    font-size:11px;
}
.user-search-empty {
    padding:10px;
}
.modal-actions {
    display:flex;
    justify-content:flex-end;
    gap:8px;
    padding-top:4px;
}
.kyc-review {
    display:grid;
    gap:14px;
}
.kyc-review-summary {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fbfcfe;
    padding:14px;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(260px,360px);
    gap:14px;
    align-items:center;
}
.kyc-person {
    min-width:0;
    display:flex;
    align-items:center;
    gap:12px;
}
.kyc-person p,
.kyc-section .section-kicker {
    margin:0;
    color:var(--muted);
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
}
.kyc-person h3 {
    margin:3px 0 5px;
    font-family:Montserrat,sans-serif;
    font-size:18px;
    font-weight:800;
}
.kyc-avatar {
    width:52px;
    height:52px;
    border-radius:10px;
    background:var(--ink);
    color:#fff;
    display:grid;
    place-items:center;
    font-family:Montserrat,sans-serif;
    font-size:16px;
    font-weight:800;
    flex:0 0 auto;
}
.kyc-summary-metrics {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
}
.kyc-review-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}
.kyc-section {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:13px;
    display:grid;
    gap:10px;
    min-width:0;
}
.kyc-section.wide {
    grid-column:1 / -1;
}
.kyc-fact-grid {
    display:grid;
    gap:8px;
}
.kyc-fact-grid.two {
    grid-template-columns:repeat(2,minmax(0,1fr));
}
.kyc-fact-grid.three {
    grid-template-columns:minmax(0,2fr) repeat(2,minmax(150px,1fr));
}
.kyc-fact,
.kyc-check {
    min-width:0;
    border-bottom:1px solid #edf0f4;
    padding:0 0 8px;
    display:grid;
    gap:4px;
}
.kyc-fact:last-child,
.kyc-check:last-child {
    border-bottom:0;
    padding-bottom:0;
}
.kyc-fact span,
.kyc-check span {
    color:var(--muted);
    font-size:11px;
    font-weight:700;
}
.kyc-fact strong,
.kyc-check strong {
    min-width:0;
    color:var(--ink);
    font-size:13px;
    font-weight:800;
    overflow-wrap:anywhere;
}
.kyc-file-grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
}
.kyc-file-card {
    min-width:0;
    border:1px solid var(--line);
    border-radius:8px;
    overflow:hidden;
    background:#fff;
    cursor:pointer;
    transition:border-color .15s ease, background .15s ease;
}
.kyc-file-card:hover,
.kyc-file-card:focus-visible {
    border-color:var(--blue);
    background:#fbfcfe;
    outline:0;
}
.kyc-file-preview {
    min-height:104px;
    background:#111827;
    color:#fff;
    display:grid;
    place-items:center;
    align-content:center;
    gap:5px;
    text-align:center;
}
.kyc-file-preview.selfie {
    background:#263241;
}
.kyc-file-preview strong {
    font-family:Montserrat,sans-serif;
    font-size:22px;
    font-weight:800;
}
.kyc-file-preview span {
    color:rgba(255,255,255,.72);
    font-size:11px;
    font-weight:800;
}
.kyc-file-meta {
    padding:10px;
    display:grid;
    gap:6px;
}
.kyc-file-meta strong {
    font-size:12px;
    font-weight:800;
    overflow-wrap:anywhere;
}
.kyc-file-meta span {
    color:var(--muted);
    font-size:11px;
    font-weight:700;
}
.kyc-file-open {
    justify-self:start;
    margin-top:2px;
}
.kyc-file-viewer {
    display:none;
}
.kyc-file-viewer.visible {
    display:block;
}
.kyc-file-viewer-inner {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fbfcfe;
    overflow:hidden;
}
.kyc-file-viewer-head {
    min-height:58px;
    border-bottom:1px solid var(--line);
    padding:12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.kyc-file-viewer-head h3 {
    margin:3px 0;
    font-family:Montserrat,sans-serif;
    font-size:15px;
    font-weight:800;
}
.kyc-file-viewer-head span,
.kyc-original-note {
    color:var(--muted);
    font-size:12px;
    font-weight:700;
}
.kyc-file-viewer-actions {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
}
.kyc-file-viewer-body {
    padding:12px;
    display:grid;
    grid-template-columns:minmax(0,1fr) 280px;
    gap:12px;
    align-items:start;
}
.kyc-image-stage,
.kyc-document-stage,
.kyc-selfie-stage {
    min-height:420px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    overflow:hidden;
}
.kyc-image-stage {
    display:grid;
    place-items:center;
}
.kyc-image-stage img {
    max-width:100%;
    max-height:560px;
    display:block;
}
.kyc-pdf-preview {
    width:100%;
    height:560px;
    border:0;
    display:block;
    background:#fff;
}
.kyc-preview-loading,
.kyc-preview-error {
    min-height:260px;
    display:grid;
    place-items:center;
    gap:6px;
    text-align:center;
    color:#667085;
    font-weight:800;
    background:#f7f9fc;
}
.kyc-preview-error strong,
.kyc-preview-error span {
    display:block;
}
.kyc-file-download-stage {
    align-content:center;
    justify-items:start;
}
.kyc-doc-copy {
    position:relative;
    z-index:1;
    margin:0;
    color:var(--muted);
    font-size:13px;
    font-weight:700;
    line-height:1.55;
}
.kyc-document-stage {
    position:relative;
    padding:22px;
    display:grid;
    align-content:space-between;
    gap:18px;
}
.kyc-doc-watermark {
    position:absolute;
    right:22px;
    top:18px;
    color:#eef1f5;
    font-family:Montserrat,sans-serif;
    font-size:84px;
    font-weight:800;
    line-height:1;
    pointer-events:none;
}
.kyc-doc-head {
    position:relative;
    z-index:1;
    display:grid;
    gap:5px;
}
.kyc-doc-head span {
    color:var(--muted);
    font-family:Montserrat,sans-serif;
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
}
.kyc-doc-head strong {
    font-family:Montserrat,sans-serif;
    font-size:20px;
    font-weight:800;
}
.kyc-doc-body {
    position:relative;
    z-index:1;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}
.kyc-doc-footer {
    position:relative;
    z-index:1;
    border-top:1px solid var(--line);
    padding-top:12px;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
}
.kyc-selfie-stage {
    position:relative;
    background:#111827;
    display:grid;
    place-items:center;
}
.kyc-selfie-photo {
    width:min(320px,72%);
    aspect-ratio:3 / 4;
    border:1px solid rgba(255,255,255,.18);
    border-radius:18px;
    background:linear-gradient(180deg,#263241,#111827);
    color:#fff;
    display:grid;
    place-items:center;
    align-content:center;
    gap:8px;
}
.kyc-selfie-photo strong {
    width:92px;
    height:92px;
    border-radius:50%;
    background:#fff;
    color:var(--ink);
    display:grid;
    place-items:center;
    font-family:Montserrat,sans-serif;
    font-size:28px;
    font-weight:800;
}
.kyc-selfie-photo span {
    color:rgba(255,255,255,.72);
    font-size:12px;
    font-weight:800;
}
.kyc-selfie-scan {
    position:absolute;
    inset:10%;
    border:1px solid rgba(255,255,255,.18);
    border-radius:22px;
    pointer-events:none;
}
.kyc-selfie-scan span {
    position:absolute;
    left:12%;
    right:12%;
    height:1px;
    background:rgba(76,189,255,.55);
}
.kyc-selfie-scan span:nth-child(1) { top:28%; }
.kyc-selfie-scan span:nth-child(2) { top:50%; }
.kyc-selfie-scan span:nth-child(3) { top:72%; }
.kyc-file-inspector {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:12px;
    display:grid;
    gap:8px;
}
.kyc-check-list {
    display:grid;
    gap:8px;
}
.kyc-check {
    grid-template-columns:minmax(0,1fr) auto auto;
    align-items:center;
}
.kyc-note {
    margin:0;
    color:#4b5563;
    font-size:13px;
    line-height:1.55;
    font-weight:700;
}
.kyc-decision-bar {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fbfcfe;
    padding:10px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.kyc-decision-bar span {
    color:var(--muted);
    font-size:12px;
    font-weight:800;
}
.toast-stack {
    position:fixed;
    right:18px;
    bottom:18px;
    z-index:1200;
    display:grid;
    gap:8px;
}
.toast {
    width:320px;
    border:1px solid var(--line);
    border-left:3px solid var(--blue);
    border-radius:8px;
    background:#fff;
    padding:11px 12px;
    font-size:13px;
    font-weight:700;
}
.toast.success { border-left-color:var(--green); }
.toast.danger { border-left-color:var(--red); }
.empty-state {
    min-height:180px;
    display:grid;
    place-items:center;
    color:var(--muted);
    text-align:center;
}
.empty-state strong {
    display:block;
    margin-bottom:4px;
    color:var(--ink);
    font-family:Montserrat,sans-serif;
}

/* Admin heading and spacing normalization */
.admin-shell h1,
.admin-shell h2,
.admin-shell h3,
.modal-card h2,
.modal-card h3 {
    font-family:var(--admin-heading-font);
    font-weight:800;
    letter-spacing:0;
}
.admin-topbar h1 {
    font-size:var(--admin-page-heading-size);
    line-height:1.2;
}
.panel-head h2,
.panel-head h3,
.report-card h3,
.permission-card h3,
.user-card-head h2,
.kyc-person h3,
.kyc-file-viewer-head h3,
.mail-preview-header strong,
.mail-html-card h2,
.modal-head h2,
.kyc-doc-head strong {
    margin-top:0;
    font-family:var(--admin-heading-font);
    font-size:var(--admin-card-heading-size);
    font-weight:800;
    line-height:1.25;
}
.panel-head p,
.admin-eyebrow,
.modal-head p,
.section-kicker,
.kyc-person p,
.kyc-section .section-kicker {
    font-family:var(--admin-heading-font);
    font-size:var(--admin-kicker-size);
    font-weight:800;
    letter-spacing:0;
    line-height:1.25;
}
.admin-content {
    padding:24px;
}
.view-grid,
.split-layout,
.mailbox-layout,
.chat-shell,
.permission-grid,
.report-grid,
.kyc-review,
.kyc-review-grid {
    gap:var(--admin-container-gap);
}
.kpi-grid,
.metric-strip,
.user-stat-grid,
.user-finance-grid,
.user-health-card,
.user-access-grid,
.permission-toggle-grid,
.form-grid,
.mailbox-compose {
    gap:14px;
}
.panel-head,
.mail-preview-header,
.modal-head {
    padding-left:var(--admin-panel-padding);
    padding-right:var(--admin-panel-padding);
}
.panel-body,
.modal-body {
    padding:var(--admin-panel-padding);
}
.report-card,
.permission-card,
.user-health-card,
.user-section,
.user-action-deck,
.risk-score-card,
.notice-strip,
.permission-toggle-row {
    padding:var(--admin-panel-padding);
}
.side-detail {
    top:var(--admin-container-gap);
}
.pro-user-detail {
    border-color:#cfd7e3;
}
.pro-user-hero {
    background:
        linear-gradient(135deg, #f8fafc 0%, #eef4fb 100%);
}
.user-finance-grid.compact .metric {
    padding:12px;
}
.access-control-card,
.password-access-card,
.kyc-address-line,
.temp-password-box,
.empty-mini {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fbfcfe;
}
.access-control-card {
    min-height:92px;
    padding:12px;
    display:grid;
    gap:10px;
    align-content:space-between;
}
.access-control-card > div {
    display:grid;
    gap:3px;
}
.access-control-card span,
.password-access-card span,
.kyc-address-line span,
.temp-password-box span {
    color:var(--muted);
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
}
.access-control-card strong,
.password-access-card strong,
.kyc-address-line strong,
.temp-password-box strong {
    color:var(--ink);
    font-size:13px;
    font-weight:800;
    overflow-wrap:anywhere;
}
.access-control-card.enabled {
    border-color:#b7e4cf;
    background:var(--green-soft);
}
.access-control-card.disabled {
    border-color:#efb4b4;
    background:var(--red-soft);
}
.password-access-card {
    margin-top:12px;
    padding:12px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:12px;
    align-items:center;
}
.password-access-card div {
    display:grid;
    gap:4px;
}
.password-access-card .compact-actions {
    display:flex;
    gap:8px;
    justify-content:flex-end;
    min-width:230px;
}
.password-access-card .compact-actions .primary-button,
.password-access-card .compact-actions .danger-button,
.password-access-card .compact-actions button {
    min-height:38px;
    white-space:nowrap;
}
.password-access-card span {
    text-transform:none;
    font-family:Poppins,sans-serif;
    font-size:12px;
    font-weight:600;
    line-height:1.45;
}
.section-title-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.section-title-row .section-kicker {
    margin:0;
}
.kyc-user-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 14px;
}
.kyc-address-line {
    padding:10px 12px;
    display:grid;
    gap:5px;
}
.pro-user-detail .kyc-file-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}
.pro-user-detail .kyc-file-card {
    min-height:112px;
    border:1px solid #d5dce7;
    border-radius:8px;
    background:#fff;
    padding:12px;
    color:var(--ink);
    text-decoration:none;
    display:grid;
    grid-template-columns:42px minmax(0,1fr);
    column-gap:10px;
    row-gap:3px;
    align-content:center;
    transition:border-color .15s ease, background .15s ease, transform .15s ease;
}
.pro-user-detail .kyc-file-card:hover {
    border-color:var(--blue);
    background:var(--blue-soft);
    transform:translateY(-1px);
}
.pro-user-detail .kyc-file-card > span {
    grid-row:1 / span 4;
    width:42px;
    height:42px;
    border-radius:8px;
    display:grid;
    place-items:center;
    background:#eef1f5;
    color:#516071;
    font-family:Montserrat,sans-serif;
    font-size:10px;
    font-weight:900;
}
.pro-user-detail .kyc-file-card strong,
.pro-user-detail .kyc-file-card small,
.pro-user-detail .kyc-file-card em {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.pro-user-detail .kyc-file-card strong {
    font-family:Montserrat,sans-serif;
    font-size:12px;
}
.pro-user-detail .kyc-file-card small,
.pro-user-detail .kyc-file-card em {
    color:var(--muted);
    font-size:11px;
    font-style:normal;
    font-weight:700;
}
.kyc-user-actions {
    display:flex;
    justify-content:flex-end;
}
.empty-mini {
    padding:14px;
    color:var(--muted);
    font-size:13px;
    font-weight:700;
}
.temporary-password-result {
    display:grid;
    gap:12px;
}
.temp-password-box {
    padding:12px;
    display:grid;
    gap:6px;
}
.temp-password-box.password input {
    font-family:Consolas,monospace;
    font-size:16px;
    font-weight:800;
    letter-spacing:0;
}
.chat-shell {
    grid-template-columns:minmax(280px,340px) minmax(0,1fr);
}
.chat-shell .panel,
.chat-panel {
    border:1px solid #cfd7e3;
    border-radius:10px;
    background:#fff;
    overflow:hidden;
}
.chat-panel {
    display:grid;
    grid-template-rows:auto auto minmax(320px,1fr) auto;
    min-height:620px;
}
.chat-list {
    max-height:520px;
    overflow:auto;
    padding-right:4px;
}
.chat-item {
    border-color:#dce3ec;
    padding:12px;
}
.chat-item strong {
    color:var(--ink);
    font-family:Montserrat,sans-serif;
    font-size:13px;
}
.chat-item.active {
    border-color:var(--blue);
    background:#f2f7ff;
}
.chat-thread {
    height:auto;
    min-height:420px;
    max-height:calc(100vh - 330px);
    background:#f6f8fb;
    border-top:1px solid var(--line);
}
.message {
    border-color:#dbe3ed;
    box-shadow:0 5px 14px rgba(15,23,42,.04);
}
.message.admin {
    box-shadow:none;
}
.chat-compose {
    background:#fff;
    padding:14px;
    grid-template-columns:minmax(240px,1fr) 92px 132px;
}
.support-compose-field textarea {
    border-color:#d5dce7;
    background:#fbfcfe;
}
.support-compose-field textarea:focus {
    border-color:var(--blue);
    background:#fff;
    outline:0;
}
.support-thread-actions {
    min-width:280px;
}
.support-hold-button {
    min-width:142px;
    border-color:#c8d3df;
    background:#f8fafc;
}
.support-hold-button strong {
    color:var(--ink);
}
.support-hold-button:hover {
    border-color:var(--blue);
    background:var(--blue-soft);
}
.support-hold-button.resume {
    border-color:#86efac;
    background:#ecfdf5;
}

@media (max-width:1180px) {
    .admin-login { grid-template-columns:minmax(320px,460px); overflow:auto; align-content:start; padding:22px; }
    .admin-login-side { min-height:auto; }
    .admin-shell { grid-template-columns:214px minmax(0,1fr); }
    .admin-topbar { grid-template-columns:1fr; height:auto; min-height:118px; padding:14px; align-items:start; }
    .admin-command { width:100%; }
    .admin-top-actions { justify-self:start; }
    .kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .user-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .view-grid.two,
    .split-layout,
    .mailbox-layout,
    .chat-shell,
    .kyc-review-summary,
    .kyc-review-grid { grid-template-columns:1fr; }
    .user-detail-hero { grid-template-columns:1fr; }
    .banner-spec-card { grid-template-columns:1fr; }
    .admin-banner-card { grid-template-columns:1fr; align-items:stretch; }
    .admin-banner-actions { justify-content:flex-start; }
    .kyc-file-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .kyc-fact-grid.two,
    .kyc-fact-grid.three { grid-template-columns:1fr; }
    .kyc-file-viewer-body { grid-template-columns:1fr; }
    .side-detail { position:static; max-height:none; }
}
@media (max-width:820px) {
    .admin-login { padding:14px; }
    .admin-login-card,
    .admin-login-side { border-radius:8px; padding:22px; }
    .admin-login-card h1 { font-size:24px; }
    .admin-login-checks { grid-template-columns:1fr; }
    .admin-login-checks span,
    .admin-login-checks strong { border-bottom:1px solid #334155; }
    .admin-shell {
        height:auto;
        min-height:100vh;
        grid-template-columns:1fr;
        overflow:auto;
    }
    .admin-sidebar {
        position:static;
        max-height:none;
        border-right:0;
        border-bottom:1px solid var(--line);
    }
    .admin-nav {
        grid-template-columns:repeat(2,minmax(0,1fr));
        max-height:none;
    }
    .admin-workspace { grid-template-rows:auto minmax(0,1fr); }
    .admin-content { padding:14px; }
    .modal-layer { padding:12px; align-items:flex-start; }
    .modal-card,
    .modal-layer.wide-modal .modal-card { width:100%; max-height:calc(100vh - 24px); }
    .modal-body { max-height:calc(100vh - 112px); }
    .form-grid.two { grid-template-columns:1fr; }
    .kpi-grid,
    .view-grid.three,
    .metric-strip,
    .user-stat-grid,
    .user-finance-grid,
    .user-access-grid,
    .user-health-card,
    .report-grid,
    .permission-grid,
    .permission-toggle-grid,
    .kyc-summary-metrics,
    .kyc-file-grid { grid-template-columns:1fr; }
    .kyc-file-viewer-head { align-items:flex-start; flex-direction:column; }
    .kyc-doc-body { grid-template-columns:1fr; }
    .kyc-image-stage,
    .kyc-document-stage,
    .kyc-selfie-stage { min-height:320px; }
    .kyc-decision-bar { align-items:stretch; flex-direction:column; }
    .chat-compose { grid-template-columns:1fr; }
    .support-attach-button,
    .chat-compose .primary-button { width:100%; }
    .admin-banner-actions > button { flex:1 1 120px; }
    .message { max-width:92%; }
    .support-attachment-chip { min-width:0; max-width:100%; }
    .support-client-card { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .notification-item {
        grid-template-columns:38px minmax(0,1fr);
        align-items:start;
    }
    .notification-item > .top-action {
        grid-column:1 / -1;
        width:100%;
    }
    .notification-icon {
        width:36px;
        height:36px;
    }
}

@media (max-width:640px) {
    html,
    body {
        max-width:100%;
        overflow-x:hidden;
    }
    .admin-shell {
        min-height:100dvh;
        width:100%;
    }
    .admin-login {
        width:100%;
        min-width:0;
        display:flex;
        flex-direction:column;
        justify-content:flex-start;
        align-items:center;
        padding:14px;
        overflow-x:hidden;
    }
    .admin-login-card,
    .admin-login-side {
        width:min(320px, calc(100vw - 40px)) !important;
        min-width:0;
        max-width:calc(100vw - 40px) !important;
        padding:22px;
        overflow:hidden;
    }
    .admin-login-card h1 {
        font-size:26px;
        line-height:1.15;
    }
    .admin-login-form {
        width:100%;
        max-width:calc(100vw - 72px);
        overflow:hidden;
    }
    .admin-login-form .form-field {
        width:100%;
        min-width:0;
        max-width:100%;
    }
    .admin-login-input,
    .admin-login-submit {
        width:100% !important;
        max-width:100% !important;
    }
    .admin-login-input {
        grid-template-columns:minmax(0,1fr) 48px;
    }
    .admin-sidebar {
        padding:12px;
    }
    .admin-brand {
        height:34px;
        margin-bottom:10px;
        padding:0 4px;
    }
    .admin-brand img {
        width:122px;
    }
    .admin-role-card {
        margin-bottom:10px;
        padding:10px;
    }
    .admin-nav {
        display:flex;
        gap:6px;
        overflow-x:auto;
        overflow-y:hidden;
        padding:0 0 4px;
        scrollbar-width:thin;
    }
    .admin-nav button {
        width:auto;
        min-width:max-content;
        flex:0 0 auto;
        min-height:34px;
        padding:0 10px;
        gap:10px;
    }
    .admin-workspace {
        grid-template-rows:auto minmax(0,1fr);
    }
    .admin-topbar {
        min-height:0;
        padding:12px;
        gap:10px;
    }
    .admin-topbar h1 {
        font-size:18px;
    }
    .admin-command {
        width:100%;
    }
    .admin-top-actions {
        width:100%;
        justify-content:flex-start;
        flex-wrap:wrap;
        gap:8px;
    }
    .admin-content {
        width:100%;
        padding:12px;
        overflow-x:hidden;
    }
    .panel,
    .table-panel,
    .detail-panel,
    .chat-panel,
    .report-card,
    .modal-card {
        max-width:100%;
    }
    .panel-head,
    .toolbar,
    .notice-strip,
    .kyc-decision-bar,
    .modal-head,
    .modal-actions {
        align-items:stretch;
        flex-direction:column;
    }
    .panel-head {
        min-height:0;
    }
    .notice-strip {
        gap:6px;
    }
    #modal-form,
    .modal-body,
    .form-grid,
    .form-field,
    .user-search-field {
        min-width:0;
        max-width:100%;
    }
    .modal-layer {
        padding:8px;
    }
    .modal-card,
    .modal-layer.wide-modal .modal-card {
        width:100%;
        max-height:calc(100dvh - 16px);
    }
    .modal-body {
        max-height:calc(100dvh - 118px);
        overflow-x:hidden;
    }
    .input,
    .select,
    .textarea {
        max-width:100%;
        font-size:14px;
    }
    .modal-actions > button,
    .top-action,
    .ghost-button,
    .danger-button,
    .primary-button {
        width:100%;
        justify-content:center;
    }
    .user-search-results {
        max-width:100%;
        box-shadow:none;
    }
    .user-search-option,
    .user-search-option strong,
    .user-search-option span,
    .user-search-option small {
        overflow:hidden;
        text-overflow:ellipsis;
    }
    .table-wrap {
        width:100%;
        max-width:100%;
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
    }
    table {
        min-width:720px;
    }
    td,
    th {
        padding-left:10px;
        padding-right:10px;
    }
    .table-action-row {
        justify-content:flex-start;
        flex-wrap:wrap;
    }
    .chat-panel {
        min-height:calc(100dvh - 220px);
    }
    .support-client-card {
        grid-template-columns:1fr;
        padding:10px;
    }
    .chat-thread {
        min-height:320px;
        max-height:52dvh;
    }
    .support-thread-actions {
        min-width:0;
        width:100%;
        flex-wrap:wrap;
    }
}

@media (max-width:480px) {
    .admin-login-card,
    .admin-login-side {
        width:min(320px, calc(100vw - 40px)) !important;
        max-width:calc(100vw - 40px) !important;
        padding:20px;
    }
    .admin-login-card h1 {
        font-size:24px;
    }
    .admin-login-form {
        max-width:100%;
    }
}


/* Support Chat image previews */
.support-image-preview {
    display:block;
    width:220px;
    height:220px;
    aspect-ratio:1 / 1;
    overflow:hidden;
    border-radius:12px;
    border:1px solid var(--line);
    background:#eef3f8;
    text-decoration:none;
    line-height:0;
}

.support-image-preview img {
    display:block;
    width:100%;
    height:100%;
    aspect-ratio:1 / 1;
    object-fit:cover;
    object-position:center;
    border:0;
}

.message.admin .support-image-preview {
    border-color:rgba(255,255,255,.32);
}

@media (max-width:600px) {
    .support-image-preview {
        width:180px;
        height:180px;
    }
}

/* Support chat image previews */
.support-image-preview {
    display: block;
    width: 300px;
    height: 300px;
    max-width: 100%;
    aspect-ratio: 3 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: #eef3f8;
    text-decoration: none;
    line-height: 0;
}

.support-preview-image {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 3;
    object-fit: cover;
    object-position: center;
    border: 0;
    border-radius: inherit;
    background: #eef3f8;
}

.support-preview-image:not([src]) {
    visibility: hidden;
}

.support-preview-image.support-image-error {
    display: none;
}

.message.admin .support-image-preview {
    background: rgba(255,255,255,.14);
}

@media (max-width: 700px) {
    .support-image-preview {
        width: 240px;
        height: 240px;
    }
}
