/*
=================================================================
AUTH / Authvantah — Unified Client Design System v2
Production path: /public_html/assets/css/style.css
=================================================================

Design direction:
- Premium technology / private-client platform
- One visual language across Dashboard, Recovery, Analyzer, Reports,
  Wallet, Support, Profile and Security
- Solid colors only — NO gradients
- Slightly brighter than the previous near-black theme
- High-contrast typography
- Consistent sidebar/navigation on every authenticated page

Important:
Individual PHP pages that still contain large inline <style> blocks may
override this stylesheet. During migration we will remove those inline
layout styles page-by-page.
*/

:root {
    color-scheme: dark;

    /* Brand */
    --auth-green: #43d9a3;
    --auth-green-strong: #26c98f;
    --auth-green-soft: #8ceac8;
    --auth-green-muted: #4fa887;

    /* Surfaces */
    --auth-bg: #09110f;
    --auth-sidebar: #07100d;
    --auth-surface: #0d1714;
    --auth-surface-2: #111d19;
    --auth-surface-3: #15221e;
    --auth-input: #0a1411;

    /* Borders */
    --auth-border: #22332d;
    --auth-border-strong: #315046;
    --auth-border-accent: #2a6e57;

    /* Text */
    --auth-text: #f2f7f4;
    --auth-text-soft: #c9d6d0;
    --auth-muted: #81958c;
    --auth-muted-2: #62766d;

    /* Status */
    --auth-warning: #d8bf73;
    --auth-danger: #e98984;
    --auth-info: #84aef2;

    /* Shape */
    --auth-radius-xs: 7px;
    --auth-radius-sm: 10px;
    --auth-radius: 14px;
    --auth-radius-lg: 18px;
    --auth-radius-xl: 22px;

    /* Layout */
    --auth-sidebar-width: 264px;
    --auth-content-max: 1500px;

    /* Typography */
    --auth-font:
        Inter,
        "SF Pro Text",
        "SF Pro Display",
        "Segoe UI Variable",
        "Segoe UI",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        Arial,
        sans-serif;

    --auth-font-mono:
        "SFMono-Regular",
        "Cascadia Code",
        "Roboto Mono",
        Consolas,
        monospace;

    /* Shadows: restrained, no glow */
    --auth-shadow-sm: 0 8px 24px rgba(0, 0, 0, .14);
    --auth-shadow: 0 18px 50px rgba(0, 0, 0, .18);

    /*
     * Backwards-compatible aliases for existing pages.
     * These let old PHP markup begin inheriting the new system.
     */
    --bg: var(--auth-bg);
    --panel: var(--auth-surface);
    --panel2: var(--auth-surface-2);
    --line: var(--auth-border);
    --line2: var(--auth-border-strong);
    --text: var(--auth-text);
    --muted: var(--auth-muted);
    --green: var(--auth-green);
    --green2: var(--auth-green-strong);
    --emerald: var(--auth-green);
    --emerald-line: var(--auth-border-accent);
    --gold: var(--auth-warning);
    --danger: var(--auth-danger);
    --shadow: var(--auth-shadow);
}


/* ==============================================================
   RESET / BASE
   ============================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--auth-bg);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: var(--auth-font);
    font-size: 14px;
    font-weight: 450;
    line-height: 1.55;
    letter-spacing: -.008em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: rgba(67, 217, 163, .22);
    color: #ffffff;
}

:focus-visible {
    outline: 2px solid var(--auth-green);
    outline-offset: 2px;
}


/* ==============================================================
   TYPOGRAPHY
   ============================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    color: var(--auth-text);
    font-weight: 760;
    letter-spacing: -.035em;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.02;
}

h2 {
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    line-height: 1.12;
}

h3 {
    font-size: 1.08rem;
    line-height: 1.25;
}

p {
    margin-top: 0;
}

.auth-kicker,
.kicker {
    color: var(--auth-green);
    font-size: 10px;
    font-weight: 780;
    line-height: 1.2;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.auth-lead,
.lead {
    max-width: 760px;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.72;
}

.auth-mono {
    font-family: var(--auth-font-mono);
}


/* ==============================================================
   APP LAYOUT
   ============================================================== */

.auth-app,
.shell {
    display: grid;
    grid-template-columns: var(--auth-sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
    background: var(--auth-bg);
}

.auth-main,
.main {
    min-width: 0;
    padding: 34px clamp(24px, 3.8vw, 58px) 64px;
}

.auth-content {
    width: 100%;
    max-width: var(--auth-content-max);
    margin: 0 auto;
}


/* ==============================================================
   SIDEBAR — STANDARD ON EVERY AUTHENTICATED CLIENT PAGE
   ============================================================== */

.auth-sidebar,
.sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 100vh;
    overflow-y: auto;
    padding: 27px 18px 20px;
    background: var(--auth-sidebar);
    border-right: 1px solid var(--auth-border);
}

.auth-brand,
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    margin: 0 5px 30px;
    color: var(--auth-text);
}

/*
 * Preferred logo markup:
 *
 * <a class="auth-brand" href="/dashboard.php">
 *   <img class="auth-brand-logo"
 *        src="/assets/images/auth-logo.png"
 *        alt="AUTH">
 * </a>
 *
 * If a page still uses the old .mark + AUTH text, it remains usable
 * until we migrate that page.
 */
.auth-brand-logo {
    width: auto;
    max-width: 178px;
    height: 42px;
    object-fit: contain;
    object-position: left center;
}

.auth-brand-mark,
.mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #3ad29b;
    border-radius: 12px;
    background: var(--auth-green);
    color: #06110d;
    font-size: 16px;
    font-weight: 850;
    line-height: 1;
}

.auth-brand-copy {
    min-width: 0;
}

.auth-brand-name {
    color: var(--auth-text);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1;
}

.auth-brand-subtitle {
    margin-top: 6px;
    color: var(--auth-muted-2);
    font-size: 8px;
    font-weight: 720;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.auth-nav-label {
    margin: 25px 13px 9px;
    color: #62766e;
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.auth-nav,
.nav {
    display: grid;
    gap: 5px;
}

.auth-nav a,
.nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 45px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #8ea299;
    font-size: 12px;
    font-weight: 650;
    transition:
        background-color .16s ease,
        border-color .16s ease,
        color .16s ease;
}

.auth-nav a:hover,
.nav a:hover {
    background: var(--auth-surface);
    border-color: var(--auth-border);
    color: var(--auth-text-soft);
}

.auth-nav a.active,
.nav a.active {
    background: #0c2119;
    border-color: #1e4c3d;
    color: var(--auth-text);
}

.auth-nav a.active::before,
.nav a.active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    border-radius: 3px;
    background: var(--auth-green);
}

.auth-nav-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    color: var(--auth-green);
}

.auth-sidebar-footer,
.side-foot {
    margin-top: 32px;
    padding: 18px 10px 2px;
    border-top: 1px solid var(--auth-border);
}

.side-foot {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
}

.auth-user-name,
.side-name {
    color: var(--auth-text-soft);
    font-size: 11px;
    font-weight: 750;
}

.auth-user-email,
.side-email {
    margin-top: 4px;
    overflow: hidden;
    color: var(--auth-muted-2);
    font-size: 9px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-signout {
    display: inline-flex;
    margin-top: 11px;
    color: #81978d;
    font-size: 10px;
    font-weight: 650;
}

.auth-signout:hover {
    color: var(--auth-text);
}


/* ==============================================================
   MOBILE NAVIGATION
   ============================================================== */

.auth-mobile-bar {
    display: none;
}

.auth-mobile-menu {
    display: none;
}


/* ==============================================================
   PAGE HEADER
   ============================================================== */

.auth-page-header,
.top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.auth-page-heading {
    min-width: 0;
}

.auth-page-title {
    margin: 7px 0 7px;
}

.auth-page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-status-pill,
.secure-badge,
.live-badge {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    padding: 0 10px;
    border: 1px solid var(--auth-border-strong);
    border-radius: 999px;
    background: var(--auth-surface);
    color: var(--auth-green-soft);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}


/* ==============================================================
   CARDS / PANELS
   ============================================================== */

.auth-card,
.card,
.stat,
.info,
.reserve,
.balance-hero {
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    box-shadow: none;
}

.auth-card,
.card {
    border-radius: var(--auth-radius-lg);
}

.auth-card {
    padding: 22px;
}

.card {
    overflow: hidden;
}

.auth-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--auth-border);
}

.auth-card-title,
.card-title {
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 740;
    letter-spacing: -.018em;
}

.auth-card-copy,
.card-copy {
    margin-top: 5px;
    color: var(--auth-muted);
    font-size: 10px;
    line-height: 1.6;
}


/* ==============================================================
   METRICS
   ============================================================== */

.auth-metrics,
.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.auth-metric,
.stat {
    min-width: 0;
    padding: 18px;
    border-radius: var(--auth-radius);
}

.auth-metric-label,
.stat-label,
.balance-label {
    color: #667c72;
    font-size: 8px;
    font-weight: 760;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-metric-value,
.stat-value,
.balance-value {
    margin-top: 9px;
    color: var(--auth-text);
    font-size: clamp(1.4rem, 2.7vw, 2.05rem);
    font-weight: 760;
    letter-spacing: -.04em;
}

.auth-metric-sub,
.stat-sub,
.balance-sub {
    margin-top: 5px;
    color: var(--auth-muted-2);
    font-size: 9px;
    line-height: 1.45;
}


/* ==============================================================
   BUTTONS
   ============================================================== */

.auth-btn,
.btn {
    appearance: none;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: var(--auth-surface-2);
    color: var(--auth-text-soft);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 0 15px;
    font-size: 10px;
    font-weight: 720;
    line-height: 1;
    transition:
        background-color .16s ease,
        border-color .16s ease,
        color .16s ease,
        transform .16s ease;
}

.auth-btn:hover,
.btn:hover {
    background: var(--auth-surface-3);
    border-color: var(--auth-border-strong);
    color: var(--auth-text);
}

.auth-btn:active,
.btn:active {
    transform: translateY(1px);
}

.auth-btn-primary,
.btn.primary {
    background: var(--auth-green);
    border-color: var(--auth-green);
    color: #06110d;
}

.auth-btn-primary:hover,
.btn.primary:hover {
    background: #55dfad;
    border-color: #55dfad;
    color: #06110d;
}

.auth-btn-danger,
.btn.red {
    background: transparent;
    border-color: #663b39;
    color: #ecaaa6;
}

.auth-btn-warning,
.btn.gold {
    background: transparent;
    border-color: #665d38;
    color: #dbc77b;
}

.auth-btn-quiet {
    background: transparent;
}

.auth-btn:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: .48;
    transform: none;
}


/* ==============================================================
   FORMS
   ============================================================== */

.auth-field,
.group {
    margin-bottom: 15px;
}

.auth-label,
.group label {
    display: block;
    margin-bottom: 7px;
    color: #b8c9c1;
    font-size: 9px;
    font-weight: 690;
    letter-spacing: .01em;
}

.auth-input,
.auth-select,
.auth-textarea,
.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid var(--auth-border);
    border-radius: 11px;
    outline: none;
    background: var(--auth-input);
    color: var(--auth-text);
    color-scheme: dark;
    min-height: 47px;
    padding: 11px 13px;
    font-size: 12px;
    transition:
        border-color .15s ease,
        background-color .15s ease;
}

.auth-textarea,
.textarea {
    min-height: 125px;
    resize: vertical;
    line-height: 1.6;
}

.auth-input:focus,
.auth-select:focus,
.auth-textarea:focus,
.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--auth-border-accent);
    background: #0b1713;
    box-shadow: none;
}

.auth-input::placeholder,
.auth-textarea::placeholder,
.input::placeholder,
.textarea::placeholder {
    color: #566b62;
}

.auth-select option,
.select option {
    background: var(--auth-input);
    color: var(--auth-text);
}

.auth-field-help {
    margin-top: 6px;
    color: var(--auth-muted-2);
    font-size: 9px;
    line-height: 1.45;
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--auth-muted);
    font-size: 10px;
    line-height: 1.55;
}

.auth-check input {
    margin-top: 3px;
    accent-color: var(--auth-green);
}


/* ==============================================================
   TABLES
   ============================================================== */

.auth-table-wrap,
.table-wrap {
    width: 100%;
    overflow: auto;
}

.auth-table,
table {
    width: 100%;
    border-collapse: collapse;
}

.auth-table th,
table th {
    padding: 11px 12px;
    border-bottom: 1px solid var(--auth-border);
    color: #61766c;
    font-size: 8px;
    font-weight: 760;
    letter-spacing: .1em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.auth-table td,
table td {
    padding: 13px 12px;
    border-bottom: 1px solid #18251f;
    color: #9bafa6;
    font-size: 10px;
    vertical-align: top;
}

.auth-table tbody tr:hover,
table tbody tr:hover {
    background: #0f1a16;
}


/* ==============================================================
   BADGES / STATUS
   ============================================================== */

.auth-badge,
.badge,
.status,
.confidence {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid var(--auth-border-strong);
    border-radius: 999px;
    background: transparent;
    color: #a4b9af;
    font-size: 7px;
    font-weight: 760;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.auth-badge-success,
.badge.active,
.badge.accepted,
.badge.completed,
.badge.confirmed,
.status.confirmed,
.confidence.verified {
    border-color: #285b49;
    color: #75deb7;
}

.auth-badge-warning,
.badge.submitted,
.badge.under_review,
.badge.awaiting_customer,
.status.submitted,
.status.under_review,
.confidence.moderate {
    border-color: #5d5638;
    color: #d8c47c;
}

.auth-badge-danger,
.badge.rejected,
.badge.declined,
.badge.cancelled,
.badge.unrecoverable,
.status.rejected {
    border-color: #613a38;
    color: #e6a09c;
}


/* ==============================================================
   ALERTS
   ============================================================== */

.auth-alert,
.alert,
.success,
.warning,
.notice {
    padding: 13px 14px;
    border-radius: 11px;
    font-size: 10px;
    line-height: 1.6;
}

.auth-alert-success,
.success {
    background: #0d1c16;
    border: 1px solid #285640;
    color: #95ceb5;
}

.auth-alert-danger,
.alert {
    background: #1a100f;
    border: 1px solid #613a38;
    color: #e7aaa6;
}

.auth-alert-warning,
.warning,
.notice {
    background: #18160f;
    border: 1px solid #574f33;
    color: #b9aa73;
}


/* ==============================================================
   AUTHENTICATION PAGES
   ============================================================== */

.auth-page {
    min-height: 100vh;
    padding: 42px 20px 64px;
    background: var(--auth-bg);
}

.auth-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.auth-login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.auth-login-brand img {
    width: auto;
    max-width: 185px;
    height: 44px;
    object-fit: contain;
}

.auth-panel,
.auth-card {
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-xl);
    box-shadow: var(--auth-shadow);
}

.auth-panel {
    padding: clamp(24px, 5vw, 36px);
}

.auth-heading h1 {
    margin: 0 0 9px;
    font-size: 31px;
    font-weight: 760;
}

.auth-heading p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.7;
}


/* ==============================================================
   UTILITIES
   ============================================================== */

.auth-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.auth-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.auth-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.auth-stack {
    display: grid;
    gap: 14px;
}

.auth-divider {
    height: 1px;
    background: var(--auth-border);
}

.auth-muted {
    color: var(--auth-muted);
}

.auth-text-green {
    color: var(--auth-green);
}

.auth-empty,
.empty {
    padding: 28px 20px;
    color: var(--auth-muted-2);
    font-size: 10px;
    line-height: 1.6;
    text-align: center;
}


/* ==============================================================
   MOBILE
   ============================================================== */

@media (max-width: 1080px) {
    .auth-app,
    .shell {
        grid-template-columns: 1fr;
    }

    .auth-sidebar,
    .sidebar {
        display: none;
    }

    .auth-mobile-bar {
        position: sticky;
        top: 0;
        z-index: 50;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 64px;
        padding: 10px 18px;
        background: var(--auth-sidebar);
        border-bottom: 1px solid var(--auth-border);
    }

    .auth-mobile-bar img {
        width: auto;
        max-width: 132px;
        height: 34px;
        object-fit: contain;
    }

    .auth-main,
    .main {
        padding-top: 26px;
    }
}

@media (max-width: 760px) {
    .auth-main,
    .main {
        padding: 22px 15px 44px;
    }

    .auth-page-header,
    .top {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .auth-page-actions {
        width: 100%;
    }

    .auth-metrics,
    .stats,
    .auth-grid-4,
    .auth-grid-3,
    .auth-grid-2 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.25rem;
    }
}


/* ==============================================================
   ACCESSIBILITY / MOTION
   ============================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
