/* =============================================================
   Account / Konto  –  component styles
   Relies on tokens.css var(--c-*). Scoped to .alx-acct-page.
   ============================================================= */

/* ── PAGE ──────────────────────────────────────────────────── */
.alx-acct-page { padding-top: 22px; padding-bottom: 60px; }
.alx-acct-page h1 { font-size: 27px; color: var(--c-blue); font-weight: 700; margin-bottom: 3px; }
.alx-acct-page .sub { color: var(--c-muted); font-size: 14px; margin-bottom: 16px; }

/* ── SUBTABS ───────────────────────────────────────────────── */
.alx-subtabs {
    position: relative; display: flex; gap: 2px;
    overflow-x: auto; padding-bottom: 6px;
    margin-bottom: 22px; border-bottom: 1px solid var(--c-line);
    scrollbar-width: none;
}
.alx-subtabs::-webkit-scrollbar { display: none; }
.alx-subtabs a {
    white-space: nowrap; font-weight: 600; color: var(--c-muted);
    padding: 10px 13px; border-radius: 9px 9px 0 0;
    border-bottom: 3px solid transparent; margin-bottom: -1px;
    min-height: 44px; display: inline-flex; align-items: center;
    gap: 7px; cursor: pointer; text-decoration: none;
    transition: color .15s, border-color .15s;
}
.alx-subtabs a svg { width: 16px; height: 16px; flex-shrink: 0; }
.alx-subtabs a .ok { color: var(--c-success-text); }
.alx-subtabs a.active { color: var(--c-blue); border-bottom-color: var(--c-green); }
.alx-subtabs a:hover { color: var(--c-blue); }

/* Mobile: same behaviour as the dashboard sub-nav — sticky horizontal-scroll
   strip directly under the sticky header (min-height 56px). Desktop unchanged. */
@media(max-width:991px){
    .alx-acct-page { padding-top: 0; }
    .alx-subtabs {
        position: sticky; top: 56px; z-index: 40;
        margin-left: -18px; margin-right: -18px; margin-bottom: 16px;
        padding-left: 18px; padding-right: 18px;
        background: var(--c-bg);
    }
}

/* ── ACCOUNT HEAD ──────────────────────────────────────────── */
.alx-acct-head {
    display: flex; align-items: center; gap: 16px;
    background: var(--c-card); border: 1px solid var(--c-line);
    border-radius: 14px; box-shadow: var(--shadow);
    padding: 18px 20px; margin-bottom: 18px; flex-wrap: wrap;
}
.alx-acct-avatar {
    width: 54px; height: 54px; border-radius: 50%;
    background: var(--c-blue); color: #fff;
    display: grid; place-items: center;
    font-family: 'Poppins', sans-serif; font-weight: 700;
    font-size: 20px; flex-shrink: 0; letter-spacing: -.5px;
}
.alx-acct-nm { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 18px; }
.alx-acct-em { color: var(--c-muted); font-size: 13.5px; margin-top: 1px; }
.alx-acct-stepper { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.alx-step {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 700;
    color: var(--c-success-text); background: var(--c-pos-bg);
    padding: 6px 11px; border-radius: 50px;
}
.alx-step.todo { color: var(--c-muted); background: var(--c-chip); }
.alx-step svg { width: 13px; height: 13px; }

/* ── SECTION TITLE ─────────────────────────────────────────── */
.alx-sec-hdr {
    font-size: 17px; font-weight: 600; font-family: 'Poppins', sans-serif;
    margin: 22px 0 12px; display: flex; align-items: center; gap: 10px;
    color: var(--c-text);
}
.alx-sec-hdr:first-child { margin-top: 0; }
.alx-sec-hdr .bar { width: 5px; height: 20px; background: var(--c-green); border-radius: 3px; flex-shrink: 0; }
.alx-sec-hdr .lock {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; color: var(--c-muted); margin-left: 6px;
}
.alx-sec-hdr .lock svg { width: 13px; height: 13px; }

/* ── FORM SECTION CARD ─────────────────────────────────────── */
.alx-formsec {
    background: var(--c-card); border: 1px solid var(--c-line);
    border-radius: 14px; box-shadow: var(--shadow);
    padding: 20px 22px; margin-bottom: 18px;
}
.alx-formsec.readonly { background: var(--c-card-2); }

/* ── DEF ROW ───────────────────────────────────────────────── */
.alx-defrow {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 12px 0; border-bottom: 1px solid var(--c-line);
    font-size: 14.5px; flex-wrap: wrap;
}
.alx-defrow:last-child { border-bottom: none; padding-bottom: 0; }
.alx-defrow .k { color: var(--c-muted); font-weight: 600; flex-shrink: 0; }
.alx-defrow .v { font-weight: 600; text-align: right; word-break: break-word; }

/* ── PILL / STATUS ─────────────────────────────────────────── */
.alx-pill {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 700; padding: 5px 11px;
    border-radius: 50px; text-transform: uppercase; letter-spacing: .4px;
}
.alx-pill svg { width: 12px; height: 12px; }
.alx-pill.ok  { background: var(--c-pos-bg); color: var(--c-success-text); }
.alx-pill.warn{ background: var(--c-warn-bg); color: var(--c-warn-text); }
.alx-pill.bad { background: var(--c-neg-bg); color: var(--c-danger-text); }
.alx-pill.neu { background: var(--c-chip); color: var(--c-blue); }

/* ── SECURE LINE ───────────────────────────────────────────── */
.alx-secure-line {
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--c-muted); font-size: 12.5px; margin-top: 10px;
}
.alx-secure-line svg { width: 14px; height: 14px; color: var(--c-success-text); flex-shrink: 0; }

/* ── BANNER ────────────────────────────────────────────────── */
.alx-banner {
    display: flex; gap: 12px;
    background: var(--c-warn-bg); border-left: 4px solid var(--c-orange);
    border-radius: 9px; padding: 13px 16px;
    color: var(--c-text); font-size: 14px; margin-bottom: 16px;
    align-items: flex-start;
}
.alx-banner svg { width: 18px; height: 18px; color: var(--c-orange); flex-shrink: 0; margin-top: 1px; }

/* ── QUICK ACCESS GRID ─────────────────────────────────────── */
.alx-quick {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px; margin-top: 4px;
}
.alx-qtile {
    display: flex; align-items: center; gap: 10px;
    background: var(--c-card); border: 1px solid var(--c-line);
    border-radius: 14px; box-shadow: var(--shadow);
    padding: 14px; cursor: pointer;
    transition: box-shadow .15s, transform .15s;
    font-weight: 600; font-size: 14px; text-decoration: none; color: var(--c-text);
}
.alx-qtile:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.alx-qtile .ic {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--c-card-2); color: var(--c-blue);
    display: grid; place-items: center; flex-shrink: 0;
}
.alx-qtile .ic svg { width: 18px; height: 18px; }

/* ── FIELD ─────────────────────────────────────────────────── */
.alx-field { margin-bottom: 16px; max-width: 540px; }
.alx-field:last-child { margin-bottom: 0; }
.alx-field label, .alx-field h4 {
    display: block; font-weight: 600; font-size: 13.5px;
    margin-bottom: 6px; font-family: inherit;
}
.alx-ctrl {
    width: 100%; font: inherit; color: var(--c-text);
    background: var(--c-bg); border: 1.5px solid var(--c-line);
    border-radius: 10px; padding: 11px 13px; min-height: 44px;
    transition: border-color .15s, background .15s;
}
.alx-ctrl:focus {
    border-color: var(--c-blue); background: var(--c-card);
    outline: none; box-shadow: 0 0 0 3px rgba(28,88,142,.15);
}
.alx-actionbar {
    display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px;
}

/* ── PASSWORD ──────────────────────────────────────────────── */
.alx-pwfield { position: relative; }
.alx-pwfield .alx-ctrl { padding-right: 46px; }
.alx-eye {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: none; background: none;
    color: var(--c-muted); cursor: pointer;
    display: grid; place-items: center; border-radius: 8px;
}
.alx-eye:hover { background: var(--c-chip); color: var(--c-blue); }
.alx-pwbar {
    height: 7px; border-radius: 5px;
    background: var(--c-line); overflow: hidden; margin-top: 8px;
}
.alx-pwbar i {
    display: block; height: 100%; width: 0;
    background: var(--c-danger);
    transition: width .25s, background .25s;
    border-radius: 5px;
}
.alx-pwlist { list-style: none; margin-top: 8px; display: grid; gap: 4px; }
.alx-pwlist li {
    font-size: 12.5px; color: var(--c-muted);
    display: flex; align-items: center; gap: 7px;
}
.alx-pwlist li svg { width: 13px; height: 13px; flex-shrink: 0; }
.alx-pwlist li.ok { color: var(--c-success-text); }
.alx-pwmsg-err {
    color: var(--c-danger-text); font-size: 12.5px; font-weight: 600;
    margin-top: 6px; display: none; align-items: center; gap: 6px;
}
.alx-pwmsg-ok {
    color: var(--c-success-text); font-size: 12.5px; font-weight: 600;
    margin-top: 6px; display: none; align-items: center; gap: 6px;
}
.alx-pwmsg-err.show, .alx-pwmsg-ok.show { display: flex; }

/* ── MESSAGES ──────────────────────────────────────────────── */
.alx-msg-filterbar {
    display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap;
}
.alx-msg-chip {
    display: inline-flex; align-items: center;
    padding: 6px 14px; border-radius: 9px;
    font-size: 13px; font-weight: 600;
    background: var(--c-chip); color: var(--c-muted);
    border: none; cursor: pointer;
    transition: background .15s, color .15s;
}
.alx-msg-chip.active, .alx-msg-chip:hover { background: var(--c-active); color: var(--c-blue); }

.alx-msg-card {
    display: flex; align-items: flex-start; gap: 14px;
    background: var(--c-card); border: 1px solid var(--c-line);
    border-radius: 14px; padding: 14px 16px;
    box-shadow: var(--shadow); cursor: pointer;
    transition: box-shadow .15s;
    margin-bottom: 10px; text-decoration: none;
}
.alx-msg-card:hover { box-shadow: var(--shadow-hover); }
.alx-msg-card.unread .alx-msg-title { font-weight: 700; }
.alx-msg-ic {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--c-card-2); color: var(--c-blue);
    display: grid; place-items: center; flex-shrink: 0;
}
.alx-msg-ic svg { width: 18px; height: 18px; }
.alx-msg-body { flex: 1; min-width: 0; }
.alx-msg-title { font-weight: 600; font-size: 14px; }
.alx-msg-preview { color: var(--c-muted); font-size: 13px; margin-top: 2px; }
.alx-msg-meta {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 6px; flex-shrink: 0;
}
.alx-msg-date { color: var(--c-muted); font-size: 12.5px; white-space: nowrap; }
.alx-udot { width: 9px; height: 9px; border-radius: 50%; background: var(--c-blue); }

/* expanded message body */
.alx-msg-expanded {
    margin-top: 10px; padding-top: 10px;
    border-top: 1px solid var(--c-line);
    font-size: 13.5px; line-height: 1.7; color: var(--c-text);
    display: none;
}
.alx-msg-card.open .alx-msg-expanded { display: block; }

/* ── NEWSLETTER TOGGLES ────────────────────────────────────── */
.alx-togrow {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 0; border-bottom: 1px solid var(--c-line);
}
.alx-togrow:last-child { border-bottom: none; padding-bottom: 0; }
.alx-togrow .tt { font-weight: 600; font-size: 14px; }
.alx-togrow .td { font-size: 13px; color: var(--c-muted); margin-top: 2px; }
.alx-togrow-labels { flex: 1; }

/* Tapestry checkbox hidden, toggle switch overlay */
.alx-toggle-wrap { margin-left: auto; flex-shrink: 0; position: relative; }
.alx-toggle-wrap input[type="checkbox"] {
    position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.alx-switch {
    display: block; width: 48px; height: 28px;
    border-radius: 50px; background: var(--c-line);
    cursor: pointer; position: relative; transition: background .2s;
}
.alx-switch::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 22px; height: 22px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
    transition: transform .2s;
}
.alx-toggle-wrap input:checked + .alx-switch { background: var(--c-success); }
.alx-toggle-wrap input:checked + .alx-switch::after { transform: translateX(20px); }
.alx-toggle-wrap input:disabled + .alx-switch { opacity: .5; cursor: not-allowed; }

/* ── UPLOAD SLOTS (enhanced verification) ──────────────────── */
.alx-slots {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 14px; margin-bottom: 16px;
}
@media (max-width: 760px) { .alx-slots { grid-template-columns: 1fr; } }
.alx-slot {
    background: var(--c-card); border: 1px solid var(--c-line);
    border-radius: 14px; box-shadow: var(--shadow); padding: 16px;
}
.alx-slot-hdr {
    display: flex; align-items: center;
    justify-content: space-between; gap: 8px; margin-bottom: 12px;
}
.alx-slot-title {
    font-weight: 700; font-size: 14px;
    display: flex; align-items: center; gap: 8px;
}
.alx-slot-title svg { width: 16px; height: 16px; color: var(--c-blue); flex-shrink: 0; }
.alx-ampel {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 50px;
    white-space: nowrap;
}
.alx-ampel.rev  { background: var(--c-warn-bg); color: var(--c-warn-text); }
.alx-ampel.conf { background: var(--c-pos-bg);  color: var(--c-success-text); }
.alx-ampel.none { background: var(--c-neg-bg);  color: var(--c-danger-text); }
.alx-ampel.pend { background: var(--c-chip);    color: var(--c-blue); }

/* ── DOC GRID (existing uploads) ───────────────────────────── */
.alx-docgrid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.alx-doccard {
    background: var(--c-card); border: 1px solid var(--c-line);
    border-radius: 14px; box-shadow: var(--shadow);
    padding: 14px; display: flex; align-items: center; gap: 12px;
}
.alx-doccard.confirmed { border-color: var(--c-success); }
.alx-doccard .dic {
    width: 42px; height: 42px; border-radius: 8px;
    background: var(--c-card-2); display: grid; place-items: center;
    color: var(--c-danger-text); font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.alx-doccard .dt { font-weight: 700; font-size: 13.5px; }

/* ── SELECT DARK MODE FIX ──────────────────────────────────── */
/* Native dropdown popup inherits color-scheme from element */
select { color-scheme: light; }
:root[data-theme="dark"] select { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) select { color-scheme: dark; }
}

/* ── RADIO CARDS ────────────────────────────────────────────── */
.alx-rcards { display: grid; gap: 10px; margin-top: 8px; }
.alx-rcard {
    border: 1.5px solid var(--c-line); border-radius: 10px;
    padding: 13px 15px; cursor: pointer; transition: border-color .15s, background .15s;
    display: flex; gap: 12px; align-items: flex-start;
}
.alx-rcard:hover { border-color: var(--c-blue); }
.alx-rcard input[type="radio"] { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--c-blue); }
.alx-rcard .rt { font-weight: 700; font-size: 14px; }
.alx-rcard .rd { font-size: 13px; color: var(--c-muted); margin-top: 2px; }
/* checked state — :has() supported in modern browsers */
.alx-rcard:has(input:checked) { border-color: var(--c-blue); background: var(--c-active); }

/* ── DISCLOSURE (legal detail text) ────────────────────────── */
.alx-disc { border: 1px solid var(--c-line); border-radius: 10px; margin-top: 8px; overflow: hidden; }
.alx-disc > summary {
    cursor: pointer; list-style: none; padding: 10px 14px;
    font-weight: 600; font-size: 13.5px; color: var(--c-blue);
    display: flex; align-items: center; gap: 8px; min-height: 44px;
}
.alx-disc > summary::-webkit-details-marker { display: none; }
.alx-disc > summary .chev { margin-left: auto; transition: transform .2s; }
.alx-disc[open] > summary .chev { transform: rotate(180deg); }
.alx-disc .inner {
    padding: 0 16px 14px; font-size: 13px; color: var(--c-muted); line-height: 1.6;
}
.alx-disc ul { margin: 6px 0 0 18px; }
.alx-disc li { margin: 4px 0; }

/* ── MESSAGES (details-based expand) ───────────────────────── */
.alx-msg-details { margin-bottom: 10px; border-radius: 14px; overflow: hidden; }
.alx-msg-details > summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; gap: 14px;
    background: var(--c-card); border: 1px solid var(--c-line);
    border-radius: 14px; padding: 14px 16px;
    box-shadow: var(--shadow); transition: box-shadow .15s;
}
.alx-msg-details > summary::-webkit-details-marker { display: none; }
.alx-msg-details[open] > summary {
    border-radius: 14px 14px 0 0; border-bottom-color: transparent;
    box-shadow: none;
}
.alx-msg-details > summary:hover { box-shadow: var(--shadow-hover); }
.alx-msg-details.headline > summary .alx-msg-title { font-weight: 700; }
.alx-msg-body-full {
    background: var(--c-card); border: 1px solid var(--c-line);
    border-top: none; border-radius: 0 0 14px 14px;
    padding: 16px 20px; font-size: 13.5px; line-height: 1.7;
    color: var(--c-text);
}

/* ── eKYC live status banner (top) ─────────────────────────── */
.alx-kyc-banner {
    display: flex; align-items: center; gap: 10px;
    background: var(--c-warn-bg); border-left: 4px solid var(--c-orange);
    border-radius: 9px; padding: 12px 16px; margin: 0 0 16px;
    color: var(--c-text); font-size: 14px; font-weight: 600;
}
.alx-kyc-spin {
    width: 16px; height: 16px; flex-shrink: 0;
    border: 2px solid var(--c-warn-text); border-top-color: transparent;
    border-radius: 50%; animation: alxKycSpin .8s linear infinite;
}
@keyframes alxKycSpin { to { transform: rotate(360deg); } }

/* ── per-slot hint text ────────────────────────────────────── */
.alx-slot-hint {
    font-size: 12px; color: var(--c-muted); line-height: 1.5;
    margin: 2px 0 10px;
}

/* ── per-image figure + status badge + reject reason ───────── */
.alx-doc-fig {
    position: relative; flex: 0 0 calc(50% - 4px); max-width: calc(50% - 4px);
    margin: 0; box-sizing: border-box; background: var(--c-card);
    border: 1px solid var(--c-line); border-radius: 10px;
    overflow: hidden; vertical-align: top;
}
/* status shown by a thin left accent + small badge, not a full-area colour flood.
   background is forced here (.green/.yellow/.red is 0,2,0) so a generic theme
   ".green{background:…}" rule can't flood the whole tile. */
.alx-doc-fig.green  { background: var(--c-card) !important; border-color: var(--c-line); border-left: 3px solid var(--c-success-text); }
.alx-doc-fig.yellow { background: var(--c-card) !important; border-color: var(--c-line); border-left: 3px solid var(--c-warn-text); }
.alx-doc-fig.red    { background: var(--c-card) !important; border-color: var(--c-line); border-left: 3px solid var(--c-danger-text); }
.alx-doc-fig .alx-doc-thumb { display: block; width: 100%; height: auto; margin: 0; }
.alx-doc-badge {
    display: flex; align-items: center; gap: 5px; justify-content: center;
    text-align: center; font-size: 11px; font-weight: 700;
    padding: 4px 8px; white-space: nowrap;
}
/* dot + muted-tint chip instead of a solid saturated fill */
.alx-doc-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.alx-doc-badge.green  { background: var(--c-card); color: var(--c-success-text); }
.alx-doc-badge.green::before  { background: var(--c-success-text); }
.alx-doc-badge.yellow { background: var(--c-card); color: var(--c-warn-text); }
.alx-doc-badge.yellow::before { background: var(--c-warn-text); }
.alx-doc-badge.red    { background: var(--c-neg-bg);  color: var(--c-danger-text); }
.alx-doc-badge.red::before    { background: var(--c-danger-text); }
.alx-doc-reason {
    background: var(--c-neg-bg); color: var(--c-danger-text);
    font-size: 11px; line-height: 1.45; padding: 6px 8px;
    border-top: 1px solid var(--c-danger-text);
}
/* remove (soft-hide) button — only rendered on rejected images */
.alx-doc-del {
    position: absolute; top: 6px; right: 6px; z-index: 2;
    width: 24px; height: 24px; padding: 0; line-height: 22px;
    border: none; border-radius: 50%; cursor: pointer;
    background: rgba(0, 0, 0, .6); color: #fff;
    font-size: 16px; font-weight: 700; text-align: center;
}
.alx-doc-del:hover  { background: var(--c-danger-text); }
.alx-doc-del[disabled] { opacity: .5; cursor: default; }
