:root {
    --bg: #07090d;
    --surface: #0e1118;
    --surface-2: #131722;
    --border: #202633;
    --border-light: #293140;
    --text: #f1f3f7;
    --muted: #858e9e;
    --muted-2: #5d6675;
    --accent: #7167ff;
    --accent-2: #5a50e8;
    --success: #29d391;
    --danger: #ff647b;
    --cyan: #32c9ef;
    --radius: 14px;
}

/* =========================================
   FONT AWESOME FREE - LOCAL
========================================= */

@font-face {
    font-family: "Font Awesome 5 Free";
    src: url("../fonts/fa-solid-900.woff2") format("woff2");
    font-style: normal;
    font-weight: 900;
    font-display: swap;
}

@font-face {
    font-family: "Font Awesome 5 Free";
    src: url("../fonts/fa-regular-400.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Font Awesome 5 Brands";
    src: url("../fonts/fa-brands-400.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

.fa-solid {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.fa-regular {
    font-family: "Font Awesome 5 Free";
    font-weight: 400;
}

.fa-brands {
    font-family: "Font Awesome 5 Brands";
    font-weight: 400;
}

.fa-id-card::before {
    content: "\f2c2";
}

.fa-file-arrow-down::before {
    content: "\f56d";
}

.fa-user::before {
    content: "\f007";
}

.fa-shield-halved::before {
    content: "\f3ed";
}

.fa-sun::before {
    content: "\f185";
}

.fa-moon::before {
    content: "\f186";
}

.fa-wallet::before {
    content: "\f555";
}

.fa-right-from-bracket::before {
    content: "\f2f5";
}

.fa-right-to-bracket::before {
    content: "\f2f6";
}

.fa-user-plus::before {
    content: "\f234";
}

.fa-envelope::before {
    content: "\f0e0";
}

.fa-mobile-screen-button::before {
    content: "\f3cd";
}

.fa-lock::before {
    content: "\f023";
}

.fa-eye::before {
    content: "\f06e";
}

.fa-eye-slash::before {
    content: "\f070";
}

.fa-arrow-right::before {
    content: "\f061";
}

.fa-arrow-left::before {
    content: "\f060";
}

.fa-download::before {
    content: "\f019";
}

.fa-file-lines::before {
    content: "\f15c";
}

.fa-house::before {
    content: "\f015";
}

.fa-key::before {
    content: "\f084";
}

.fa-circle-check::before {
    content: "\f058";
}

.fa-circle-exclamation::before {
    content: "\f06a";
}

.fa-circle-question::before {
    content: "\f059";
}

.fa-triangle-exclamation::before {
    content: "\f071";
}

.fa-plus::before {
    content: "\2b";
}

.fa-minus::before {
    content: "\f068";
}

.fa-chart-line::before {
    content: "\f201";
}

.fa-users::before {
    content: "\f0c0";
}

.fa-tags::before {
    content: "\f02c";
}

.fa-gear::before {
    content: "\f013";
}

.fa-history::before {
    content: "\f1da";
}

.fa-key::before {
    content: "\f084";
}

.fa-whatsapp::before {
    content: "\f232";
}

/* ================================
   GLOBAL
================================ */

html {
    background: var(--bg);
}

body {
    margin: 0;
    background: radial-gradient( circle at 80% -10%, rgba(113, 103, 255, .10), transparent 30% ), var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

* {
    box-sizing: border-box;
}


/* ================================
   APP
================================ */

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 40px 24px 70px;
}

.page-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}


/* ================================
   NAVBAR
================================ */

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

    .nav-link.active {
        color: var(--text);
        background: rgba(113, 103, 255, .12);
        box-shadow: inset 0 -2px 0 var(--accent);
    }

        .nav-link.active::after {
            content: "";
            position: absolute;
            left: 12px;
            right: 12px;
            bottom: -1px;
            height: 2px;
            border-radius: 999px;
            background: var(--accent);
        }

.mobile-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .mobile-nav a.active {
        color: var(--text);
        background: rgba(113, 103, 255, .12);
        box-shadow: inset 0 -2px 0 var(--accent);
    }

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 68px;
    background: rgba(7, 9, 13, .82);
    border-bottom: 1px solid rgba(255,255,255,.06);
    backdrop-filter: blur(18px);
}

.topbar-inner {
    max-width: 1240px;
    height: 100%;
    margin: auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 180px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient( 135deg, var(--accent), #4e45d8 );
    color: white;
    font-size: 17px;
    box-shadow: 0 5px 25px rgba(113,103,255,.25);
}

.brand-text {
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -.5px;
}

    .brand-text span {
        color: var(--accent);
    }

.desktop-nav {
    display: flex;
    gap: 5px;
    flex: 1;
}

.nav-link {
    padding: 9px 13px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
    transition: .2s;
}

    .nav-link:hover {
        background: rgba(255,255,255,.04);
        color: white;
    }

.admin-nav-link {
    color: #9a93ff;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-wallet {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    text-decoration: none;
    background: rgba(255,255,255,.02);
}

.navbar-wallet-label {
    color: var(--muted-2);
    font-size: 8px;
    letter-spacing: 1px;
}

.navbar-wallet-value {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 700;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.user-avatar {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(113,103,255,.15);
    color: #aaa5ff;
    font-size: 11px;
    font-weight: 700;
}

.user-menu-email {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 11px;
}

.logout-form {
    margin: 0;
}

.logout-button {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    cursor: pointer;
    transition: .2s;
}

    .logout-button:hover {
        border-color: var(--danger);
        color: var(--danger);
    }

.nav-login {
    padding: 8px 12px;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
}

.nav-register {
    padding: 9px 14px;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;
}


/* ================================
   MOBILE NAV
================================ */

.mobile-nav {
    display: none;
}


/* ================================
   HEADERS
================================ */

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

    .page-header h1 {
        margin: 5px 0 8px;
        font-size: 32px;
        line-height: 1.1;
        letter-spacing: -1.2px;
    }

    .page-header p {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.6;
    }

.eyebrow {
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.8px;
}


/* ================================
   WALLET
================================ */

.wallet-summary {
    min-width: 190px;
    padding: 18px 22px;
    border: 1px solid rgba(50,201,239,.16);
    border-radius: 13px;
    background: linear-gradient( 135deg, rgba(50,201,239,.08), rgba(113,103,255,.06) );
}

    .wallet-summary span {
        display: block;
        color: var(--muted);
        font-size: 8px;
        letter-spacing: 1.5px;
    }

    .wallet-summary strong {
        display: block;
        margin-top: 7px;
        color: var(--cyan);
        font-size: 24px;
    }


/* ================================
   CARDS
================================ */

.surface-card {
    margin-bottom: 22px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient( 145deg, rgba(255,255,255,.025), rgba(255,255,255,.008) );
    box-shadow: 0 15px 50px rgba(0,0,0,.12);
}

.section-heading {
    display: flex;
    gap: 14px;
    margin-bottom: 28px;
}

    .section-heading h2 {
        margin: 4px 0 6px;
        font-size: 19px;
    }

    .section-heading p {
        margin: 0;
        color: var(--muted);
        font-size: 12px;
    }

.section-icon {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(113,103,255,.12);
    color: #aaa5ff;
    font-size: 17px;
}

.section-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
}

    .section-header-row h2 {
        margin: 4px 0 0;
        font-size: 17px;
    }

.history-count {
    color: var(--muted-2);
    font-size: 10px;
}


/* ================================
   RC FORM
================================ */

.rc-form {
    display: grid;
    grid-template-columns: 1.5fr 1fr 180px;
    gap: 15px;
    align-items: end;
}

.form-field {
    margin-bottom: 17px;
}

    .form-field label {
        display: block;
        margin-bottom: 7px;
        color: #b8c0cd;
        font-size: 11px;
        font-weight: 600;
    }

.form-input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: rgba(0,0,0,.2);
    color: white;
    font-size: 12px;
    transition: .2s;
}

    .form-input:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(113,103,255,.08);
    }

    .form-input option {
        background: #10131a;
        color: white;
    }

.vehicle-number {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.input-help {
    display: block;
    margin-top: 5px;
    color: var(--muted-2);
    font-size: 9px;
}

.primary-button {
    min-height: 46px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient( 135deg, var(--accent), var(--accent-2) );
    color: white;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

    .primary-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 25px rgba(113,103,255,.25);
    }

    .primary-button:disabled {
        opacity: .55;
        cursor: wait;
        transform: none;
    }

.primary-button-popup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 40px;
    padding: 0 15px;
    margin-top: 12px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient( 135deg, var(--accent), var(--accent-2) );
    color: white;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

    .primary-button-popup:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 25px rgba(113,103,255,.25);
    }

    .primary-button-popup:disabled {
        opacity: .55;
        cursor: wait;
        transform: none;
    }

.button-arrow {
    font-size: 16px;
}

.full-button {
    width: 100%;
}

.form-message {
    display: none;
    margin-top: 5px;
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 11px;
}

    .form-message.show {
        display: block;
    }

    .form-message.success {
        border: 1px solid rgba(41,211,145,.15);
        background: rgba(41,211,145,.07);
        color: var(--success);
    }

    .form-message.error {
        border: 1px solid rgba(255,100,123,.15);
        background: rgba(255,100,123,.07);
        color: var(--danger);
    }


/* ================================
   TABLES
================================ */

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

    .data-table th {
        padding: 12px 14px;
        border-bottom: 1px solid var(--border);
        color: var(--muted-2);
        text-align: left;
        font-size: 8px;
        font-weight: 700;
        letter-spacing: 1.2px;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .data-table td {
        padding: 15px 14px;
        border-bottom: 1px solid rgba(255,255,255,.045);
        color: #bbc3d0;
        font-size: 11px;
        white-space: nowrap;
    }

    .data-table tbody tr:last-child td {
        border-bottom: 0;
    }

.table-primary {
    display: block;
    color: #d9dde5;
}

.table-secondary {
    display: block;
    margin-top: 3px;
    color: var(--muted-2);
    font-size: 9px;
}

.vehicle-badge {
    display: inline-block;
    padding: 6px 9px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: rgba(255,255,255,.025);
    color: white;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .7px;
}

.format-badge {
    color: var(--muted);
    font-size: 10px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
}

    .status > span {
        width: 5px;
        height: 5px;
        border-radius: 50%;
    }

.status-success {
    color: var(--success);
}

    .status-success > span {
        background: var(--success);
    }

.status-failed {
    color: var(--danger);
}

    .status-failed > span {
        background: var(--danger);
    }

.empty-state {
    height: 180px;
    text-align: center;
    vertical-align: middle;
    color: var(--muted) !important;
}

    .empty-state strong,
    .empty-state span {
        display: block;
    }

    .empty-state strong {
        margin-top: 8px;
        color: #b8bfca;
        font-size: 12px;
    }

    .empty-state span {
        margin-top: 5px;
        color: var(--muted-2);
        font-size: 10px;
    }

.empty-icon {
    font-size: 24px;
    color: var(--muted-2);
}


/* ================================
   PROFILE
================================ */

.profile-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 22px;
}

.profile-card {
    min-height: 300px;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-avatar {
    width: 65px;
    height: 65px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient( 135deg, rgba(113,103,255,.2), rgba(50,201,239,.1) );
    color: #aaa5ff;
    font-size: 23px;
    font-weight: 750;
}

.profile-top h2 {
    margin: 0;
    font-size: 17px;
    word-break: break-all;
}

.profile-top span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.profile-divider {
    height: 1px;
    margin: 25px 0;
    background: var(--border);
}

.profile-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.profile-field span {
    display: block;
    color: var(--muted-2);
    font-size: 8px;
    letter-spacing: 1.2px;
}

.profile-field strong {
    display: block;
    margin-top: 6px;
    color: #dce1e9;
    font-size: 12px;
    word-break: break-word;
}

.profile-wallet-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .profile-wallet-card h2 {
        margin: 5px 0;
        font-size: 18px;
    }

.profile-wallet-value {
    margin: 15px 0 7px;
    color: var(--cyan);
    font-size: 31px;
    font-weight: 750;
}

.profile-wallet-card p {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 40px;
    padding: 0 15px;
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255,255,255,.02);
    color: #dce1e9;
    font-size: 10px;
    font-weight: 650;
    text-decoration: none;
    transition: .2s;
}

    .secondary-button:hover {
        border-color: var(--accent);
        color: white;
        background: rgba(113,103,255,.08);
    }

.security-card {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .security-card .secondary-button {
        margin-top: 0;
    }


/* ================================
   ADMIN
================================ */

.admin-stats {
    display: flex;
    gap: 10px;
}

.stat-card {
    min-width: 140px;
    padding: 15px 18px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(255,255,255,.02);
}

    .stat-card span {
        display: block;
        color: var(--muted-2);
        font-size: 8px;
        letter-spacing: 1.1px;
    }

    .stat-card strong {
        display: block;
        margin-top: 5px;
        color: var(--cyan);
        font-size: 19px;
    }

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

    .search-input-wrapper > span {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
        font-size: 17px;
    }

    .search-input-wrapper input {
        width: 100%;
        height: 46px;
        padding: 0 14px 0 42px;
        border: 1px solid var(--border);
        border-radius: 9px;
        outline: none;
        background: rgba(0,0,0,.2);
        color: white;
        font-size: 11px;
    }

        .search-input-wrapper input:focus {
            border-color: var(--accent);
        }

.search-button {
    min-width: 100px;
}

.clear-button {
    color: var(--muted);
    font-size: 10px;
    text-decoration: none;
}

.customer-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    border-radius: 9px;
    background: rgba(113,103,255,.13);
    color: #aaa5ff;
    font-weight: 700;
}

.customer-cell strong {
    display: block;
    color: #e2e5eb;
    font-size: 11px;
}

.customer-cell span {
    display: block;
    max-width: 130px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--muted-2);
    font-size: 8px;
}

.wallet-value {
    color: var(--cyan);
}

.manage-button {
    display: inline-flex;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: rgba(113,103,255,.06);
    color: #a49eff;
    font-size: 9px;
    font-weight: 700;
    text-decoration: none;
}

    .manage-button:hover {
        border-color: var(--accent);
        background: rgba(113,103,255,.12);
    }


/* ================================
   ADMIN WALLET
================================ */

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 10px;
    text-decoration: none;
}

    .back-link:hover {
        color: white;
    }

.wallet-management-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 22px;
}

.customer-wallet-card {
    min-height: 300px;
}

.customer-profile {
    display: flex;
    align-items: center;
    gap: 13px;
}

.large-avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient( 135deg, rgba(113,103,255,.2), rgba(50,201,239,.1) );
    color: #aaa5ff;
    font-size: 20px;
    font-weight: 750;
}

.customer-profile h2 {
    margin: 0;
    font-size: 14px;
    word-break: break-all;
}

.customer-profile span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
}

.balance-label {
    display: block;
    color: var(--muted-2);
    font-size: 8px;
    letter-spacing: 1.2px;
}

.large-wallet-value {
    margin-top: 8px;
    color: var(--cyan);
    font-size: 30px;
    font-weight: 750;
}

.wallet-hint {
    display: block;
    margin-top: 5px;
    color: var(--muted-2);
    font-size: 9px;
}

.card-description {
    margin: 5px 0 20px;
    color: var(--muted);
    font-size: 11px;
}

.transaction-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.transaction-option {
    cursor: pointer;
}

    .transaction-option input {
        display: none;
    }

    .transaction-option span {
        display: block;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 9px;
        background: rgba(255,255,255,.015);
    }

    .transaction-option input:checked + span {
        border-color: var(--accent);
        background: rgba(113,103,255,.08);
    }

    .transaction-option strong {
        display: block;
        font-size: 10px;
    }

    .transaction-option small {
        display: block;
        margin-top: 3px;
        color: var(--muted);
        font-size: 8px;
    }

.amount-input {
    display: flex;
    align-items: center;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(0,0,0,.2);
}

    .amount-input:focus-within {
        border-color: var(--accent);
    }

    .amount-input > span {
        padding-left: 14px;
        color: var(--cyan);
        font-weight: 700;
    }

    .amount-input input {
        width: 100%;
        height: 100%;
        padding: 0 13px;
        border: 0;
        outline: 0;
        background: transparent;
        color: white;
        font-size: 13px;
    }

.form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    resize: vertical;
    background: rgba(0,0,0,.2);
    color: white;
    font-family: inherit;
    font-size: 11px;
}

    .form-field textarea:focus {
        border-color: var(--accent);
    }

.field-validation {
    display: block;
    margin-top: 4px;
    color: var(--danger);
    font-size: 9px;
}

.transaction-credit {
    color: var(--success);
    font-size: 9px;
    font-weight: 700;
}

.transaction-debit {
    color: var(--danger);
    font-size: 9px;
    font-weight: 700;
}


/* ================================
   ALERTS
================================ */

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 10px;
}

.alert-success {
    border: 1px solid rgba(41,211,145,.16);
    background: rgba(41,211,145,.07);
    color: var(--success);
}

.alert-error {
    border: 1px solid rgba(255,100,123,.16);
    background: rgba(255,100,123,.07);
    color: var(--danger);
}


/* ================================
   FOOTER
================================ */

.app-footer {
    display: flex;
    justify-content: space-between;
    max-width: 1240px;
    width: 100%;
    margin: auto;
    padding: 20px 24px 25px;
    border-top: 1px solid rgba(255,255,255,.04);
    color: var(--muted-2);
    font-size: 9px;
}


/* ================================
   RESPONSIVE
================================ */

@media (max-width: 900px) {

    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: flex;
        gap: 5px;
        overflow-x: auto;
        padding: 8px 20px;
        border-bottom: 1px solid var(--border);
        background: rgba(7,9,13,.95);
    }

        .mobile-nav a {
            padding: 7px 11px;
            border-radius: 7px;
            color: var(--muted);
            font-size: 10px;
            text-decoration: none;
            white-space: nowrap;
        }

            .mobile-nav a:hover {
                background: rgba(255,255,255,.05);
                color: white;
            }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-grid,
    .wallet-management-grid {
        grid-template-columns: 1fr;
    }

    .security-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

        .security-card .secondary-button {
            margin-top: 0;
        }

    .rc-form {
        grid-template-columns: 1fr;
    }

    .desktop-only {
        display: none;
    }

    .admin-stats {
        width: 100%;
    }

    .stat-card {
        flex: 1;
    }
}


@media (max-width: 600px) {

    .main-content {
        padding: 25px 14px 50px;
    }

    .topbar-inner {
        padding: 0 14px;
    }

    .brand {
        min-width: auto;
        flex: 1 1 auto;
    }

    .user-menu-email {
        display: none;
    }

    .navbar-wallet {
        display: none;
    }

    .logout-button {
        padding: 7px 9px;
    }

    .page-header h1 {
        font-size: 27px;
    }

    .wallet-summary {
        width: 100%;
    }

    .surface-card {
        padding: 18px;
    }

    .profile-fields {
        grid-template-columns: 1fr;
    }

    .search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .search-button {
        width: 100%;
    }

    .admin-stats {
        flex-direction: column;
    }

    .stat-card {
        width: 100%;
    }

    .transaction-selector {
        grid-template-columns: 1fr;
    }

    .app-footer {
        flex-direction: column;
        gap: 7px;
    }

    .topbar-actions {
        margin-left: auto;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .primary-button {
        width: 100% !important;
    }
}

/* ================================================================
   APNARC UI SYSTEM: THEMES, FEEDBACK, VALIDATION, CONFIRMATION
   ================================================================ */

:root {
    --bg: #07090d;
    --surface: #0e1118;
    --surface-2: #131722;
    --border: #202633;
    --border-light: #293140;
    --text: #f1f3f7;
    --muted: #858e9e;
    --muted-2: #5d6675;
    --accent: #7167ff;
    --accent-2: #5a50e8;
    --success: #29d391;
    --danger: #ff647b;
    --cyan: #32c9ef;
    --input-bg: #0a0d13;
    --shadow: 0 18px 55px rgba(0,0,0,.28);
    --focus-ring: 0 0 0 3px rgba(113,103,255,.18);
}

html[data-theme="light"] {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --border: #dfe5ee;
    --border-light: #cfd7e3;
    --text: #18202b;
    --muted: #657083;
    --muted-2: #8b95a5;
    --accent: #5c52dc;
    --accent-2: #4c43c3;
    --success: #168a5c;
    --danger: #d7465f;
    --cyan: #087fa3;
    --input-bg: #f9fbfd;
    --shadow: 0 18px 55px rgba(31,44,66,.10);
    --focus-ring: 0 0 0 3px rgba(92,82,220,.15);
}

html,
body {
    background: var(--bg);
    color: var(--text);
    transition: background-color .2s ease, color .2s ease;
}

body {
    background: radial-gradient(circle at 80% -10%, rgba(113,103,255,.10), transparent 30%), var(--bg);
}

html[data-theme="light"] body {
    background: radial-gradient(circle at 80% -10%, rgba(92,82,220,.07), transparent 30%), var(--bg);
}

.surface-card,
.search-card,
.profile-card,
.profile-wallet-card,
.security-card,
.customer-profile,
.customer-wallet-card,
.topbar,
.navbar-wallet,
.form-input,
.amount-input,
.transaction-option,
.auth-card {
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    transition: .2s ease;
}

    .theme-toggle:hover {
        color: var(--text);
        border-color: var(--accent);
        box-shadow: var(--focus-ring);
    }

.theme-icon {
    font-size: 14px;
    line-height: 1;
}

.theme-toggle-floating {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.app-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 3000;
    width: min(420px, calc(100vw - 32px));
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: .22s ease;
}

    .app-toast.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .app-toast.success {
        border-color: rgba(41,211,145,.45);
    }

    .app-toast.error {
        border-color: rgba(255,100,123,.45);
    }

    .app-toast.info {
        border-color: rgba(50,201,239,.45);
    }

.app-toast-icon {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--accent);
    font-weight: 800;
}

.app-toast.success .app-toast-icon {
    color: var(--success);
}

.app-toast.error .app-toast-icon {
    color: var(--danger);
}

.app-toast.info .app-toast-icon {
    color: var(--cyan);
}

.app-toast-message {
    flex: 1;
    font-size: 12px;
    line-height: 1.45;
}

.app-toast-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.app-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

    .app-modal.show {
        display: flex;
    }

.app-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4,7,12,.70);
    backdrop-filter: blur(7px);
}

.app-modal-dialog {
    position: relative;
    width: min(430px, 100%);
    padding: 27px;
    border: 1px solid var(--border-light);
    border-radius: 18px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 30px 90px rgba(0,0,0,.35);
}

.app-modal-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(113,103,255,.12);
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 15px;
}

.app-modal-dialog h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.app-modal-dialog p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.app-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 23px;
}

body.modal-open {
    overflow: hidden;
}

.field-validation,
.field-error,
.validation-summary {
    color: var(--danger);
}

    .field-validation:empty,
    .field-error:empty,
    .validation-summary:empty {
        display: none;
    }

.validation-summary-errors {
    padding: 11px 13px;
    border: 1px solid rgba(255,100,123,.24);
    border-radius: 10px;
    background: rgba(255,100,123,.07);
    color: var(--danger);
    font-size: 12px;
    line-height: 1.5;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-left: 18px;
    }

.input-validation-error,
.form-input.input-validation-error,
.auth-input.input-validation-error,
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(255,100,123,.08);
}

.form-message {
    display: none;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.45;
}

    .form-message.show {
        display: block;
    }

    .form-message.success {
        color: var(--success);
        background: rgba(41,211,145,.08);
        border: 1px solid rgba(41,211,145,.16);
    }

    .form-message.error {
        color: var(--danger);
        background: rgba(255,100,123,.08);
        border: 1px solid rgba(255,100,123,.16);
    }

    .form-message.info {
        color: var(--cyan);
        background: rgba(50,201,239,.08);
        border: 1px solid rgba(50,201,239,.16);
    }

/* Light-theme corrections for existing hard-coded text/backgrounds. */
html[data-theme="light"] .topbar {
    background: rgba(255,255,255,.88);
    border-bottom-color: var(--border);
}

html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .navbar-wallet,
html[data-theme="light"] .mobile-nav {
    background: rgba(24,32,43,.035);
}

html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .logout-button:hover,
html[data-theme="light"] .user-menu-email {
    color: var(--text);
}

html[data-theme="light"] .surface-card,
html[data-theme="light"] .search-card,
html[data-theme="light"] .profile-card,
html[data-theme="light"] .profile-wallet-card,
html[data-theme="light"] .security-card,
html[data-theme="light"] .customer-profile,
html[data-theme="light"] .customer-wallet-card {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: var(--shadow);
}

html[data-theme="light"] .form-input,
html[data-theme="light"] .amount-input,
html[data-theme="light"] textarea,
html[data-theme="light"] select,
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="email"],
html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="password"] {
    background: var(--input-bg);
    color: var(--text);
    border-color: var(--border);
}

html[data-theme="light"] .admin-table td,
html[data-theme="light"] .customer-cell strong,
html[data-theme="light"] .profile-field strong,
html[data-theme="light"] .page-header h1,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3 {
    color: var(--text);
}

html[data-theme="light"] .admin-table td,
html[data-theme="light"] .table-primary,
html[data-theme="light"] .table-secondary,
html[data-theme="light"] .customer-cell span {
    color: var(--muted);
}

html[data-theme="light"] .app-modal-backdrop {
    background: rgba(25,34,48,.42);
}

@media (max-width: 760px) {
    .theme-toggle .theme-label {
        display: none;
    }

    .theme-toggle {
        padding: 8px 9px;
    }

    .theme-toggle-floating .theme-label {
        display: inline;
    }

    .app-toast {
        right: 16px;
        bottom: 16px;
    }

    .app-modal-dialog {
        padding: 22px;
    }

    .app-modal-actions {
        flex-direction: column-reverse;
    }

        .app-modal-actions button {
            width: 100%;
            cursor:pointer !important;
        }
}

.profile-wallet-note {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.profile-wallet-note {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

/* ================================
   CHANGE PASSWORD
================================ */

.change-password-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
    gap: 22px;
    align-items: start;
}

.change-password-card {
    max-width: 760px;
}

.change-password-form {
    margin-top: 28px;
}

    .change-password-form .form-field {
        margin-bottom: 18px;
    }

        .change-password-form .form-field label {
            display: block;
            margin-bottom: 7px;
            color: var(--text);
            font-size: 11px;
            font-weight: 650;
        }

    .change-password-form .form-input {
        width: 100%;
        min-height: 44px;
    }

.change-password-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

    .change-password-actions .secondary-button,
    .change-password-actions .primary-button {
        min-height: 42px;
    }

.password-security-card {
    padding: 24px;
}

    .password-security-card h2 {
        margin: 7px 0 12px;
        font-size: 17px;
    }

    .password-security-card ul {
        margin: 18px 0 0;
        padding-left: 18px;
        color: var(--muted);
        font-size: 11px;
        line-height: 1.8;
    }

    .password-security-card li::marker {
        color: var(--accent);
    }

@media (max-width: 760px) {

    .change-password-layout {
        grid-template-columns: 1fr;
    }

    .change-password-card {
        max-width: none;
    }

    .change-password-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

        .change-password-actions .secondary-button,
        .change-password-actions .primary-button {
            width: 100%;
        }
}

.profile-wallet-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
}

.wallet-help-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(37, 211, 102, .12);
    color: #25d366;
}

.wallet-help-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

    .wallet-help-content strong {
        color: var(--text);
        font-size: 12px;
    }

    .wallet-help-content span {
        color: var(--muted);
        font-size: 10px;
        line-height: 1.5;
    }

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-radius: 9px;
    background: #25d366;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: .2s ease;
}

    .whatsapp-button:hover {
        color: #fff;
        transform: translateY(-1px);
        filter: brightness(1.05);
    }

@media (max-width: 600px) {

    .profile-wallet-note {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .wallet-help-content {
        min-width: calc(100% - 52px);
    }

    .whatsapp-button {
        width: 100%;
        justify-content: center;
    }
}

.sample-files-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.sample-files-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

    .sample-files-heading h3 {
        margin: 5px 0 5px;
        font-size: 15px;
    }

    .sample-files-heading p {
        margin: 0;
        color: var(--muted);
        font-size: 10px;
    }

.sample-files-heading-icon {
    color: var(--accent);
    font-size: 22px;
}

.sample-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
}

.sample-file-button {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 64px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    transition: .2s ease;
}

    .sample-file-button:hover {
        border-color: var(--accent);
        transform: translateY(-1px);
    }

.sample-file-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    border-radius: 9px;
    background: rgba(113, 103, 255, .12);
    color: var(--accent);
}

.sample-file-content {
    min-width: 0;
    flex: 1;
}

    .sample-file-content strong {
        display: block;
        font-size: 11px;
    }

    .sample-file-content small {
        display: block;
        margin-top: 3px;
        color: var(--muted);
        font-size: 9px;
    }

.sample-file-arrow {
    color: var(--muted);
}

.wallet-add-money-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
    padding: 8px 14px;
    border: 1px solid rgba(37, 211, 102, 0.3);
    border-radius: 8px;
    background: rgba(37, 211, 102, 0.08);
    color: #25d366;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

    .wallet-add-money-button:hover {
        background: rgba(37, 211, 102, 0.14);
        border-color: rgba(37, 211, 102, 0.5);
        color: #25d366;
        transform: translateY(-1px);
    }

    .wallet-add-money-button i {
        font-size: 12px;
    }

/* ================================
   ERROR / ACCESS DENIED
================================ */

.center-page {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.error-card {
    width: 100%;
    max-width: 500px;
    padding: 42px 38px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient( 145deg, rgba(255,255,255,.025), rgba(255,255,255,.008) );
    box-shadow: 0 20px 70px rgba(0,0,0,.18);
}

.error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 22px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(255,100,123,.10);
    border: 1px solid rgba(255,100,123,.18);
    color: var(--danger);
    font-size: 25px;
}

.error-code {
    margin-bottom: 6px;
    color: var(--danger);
    font-size: 52px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -2px;
}

.error-card .eyebrow {
    margin-top: 10px;
}

.error-card h1 {
    margin: 12px 0 10px;
    color: var(--text);
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: -.5px;
}

.error-card p {
    max-width: 400px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.error-button {
    margin-top: 26px;
    min-height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

/* Error icon size */
.error-icon .fa-shield-halved {
    font-size: 25px;
}


/* ================================
   ERROR RESPONSIVE
================================ */

@media (max-width: 600px) {

    .center-page {
        min-height: calc(100vh - 140px);
        padding: 25px 14px;
    }

    .error-card {
        max-width: 100%;
        padding: 32px 22px;
        border-radius: 15px;
    }

    .error-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 18px;
        border-radius: 15px;
        font-size: 22px;
    }

        .error-icon .fa-shield-halved {
            font-size: 22px;
        }

    .error-code {
        font-size: 44px;
    }

    .error-card h1 {
        font-size: 19px;
    }

    .error-card p {
        font-size: 11px;
    }

    .error-button {
        width: 100%;
    }
}

/* Compact RC download page */
.rc-page {
    max-width: 1100px;
}

.rc-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

    .rc-page-header h1 {
        margin: 0;
        color: var(--text);
        font-size: 24px;
        font-weight: 750;
        line-height: 1.2;
        letter-spacing: -.7px;
    }

.rc-wallet {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 10px 13px;
    border-color: rgba(50,201,239,.2);
    border-radius: 11px;
}

.rc-wallet-info > span {
    font-size: 8px;
}

.rc-wallet-info > strong {
    margin-top: 3px;
    font-size: 19px;
    line-height: 1.2;
}

.rc-wallet .wallet-add-money-button {
    flex-shrink: 0;
    margin-top: 0;
    padding: 8px 10px;
}

.rc-page .surface-card {
    margin-bottom: 14px;
    padding: 17px 19px;
    border-radius: 12px;
}

.rc-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
}

    .rc-card-title .section-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        border-radius: 8px;
        font-size: 13px;
    }

    .rc-card-title h2 {
        margin: 0;
        color: var(--text);
        font-size: 16px;
        font-weight: 700;
    }

.rc-page .rc-form {
    grid-template-columns: minmax(180px, 1.25fr) minmax(210px, 1fr) 155px;
    gap: 12px;
    align-items: end;
}

.rc-page .form-field {
    min-width: 0;
    margin-bottom: 0;
}

    .rc-page .form-field label {
        margin-bottom: 5px;
        color: var(--muted);
        font-size: 10px;
    }

.rc-page .form-input,
.rc-page .select2-container .select2-selection--single {
    height: 42px;
    border: 1px solid var(--border-light);
    border-radius: 9px;
    background: var(--input-bg);
    color: var(--text);
    font-size: 12px;
}

.rc-page .form-input {
    padding: 0 11px;
}

.rc-page .vehicle-number {
    letter-spacing: .7px;
}

.rc-page .rc-download-button {
    width: 100%;
    min-height: 42px;
    gap: 9px;
    padding: 0 12px;
    font-size: 11px;
}

    .rc-page .rc-download-button i {
        font-size: 11px;
    }

.rc-page .select2-container {
    width: 100% !important;
}

.rc-page .select2-container--default .select2-selection--single {
    position: relative;
    display: flex;
    align-items: center;
    outline: none;
}

    .rc-page .select2-container--default .select2-selection--single .select2-selection__rendered {
        padding-right: 36px;
        padding-left: 12px;
        overflow: hidden;
        color: var(--text);
        line-height: normal;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .rc-page .select2-container--default .select2-selection--single .select2-selection__placeholder {
        color: var(--muted);
    }

    .rc-page .select2-container--default .select2-selection--single .select2-selection__arrow {
        top: 0;
        right: 5px;
        height: 40px;
        width: 25px;
    }

.rc-page .select2-container--default.select2-container--open .select2-selection--single,
.rc-page .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

.select2-dropdown.rc-select2-dropdown {
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
}

.select2-dropdown .select2-search--dropdown {
    padding: 9px;
}

    .select2-dropdown .select2-search--dropdown .select2-search__field {
        width: 100%;
        padding: 9px 10px;
        border: 1px solid var(--border);
        border-radius: 7px;
        outline: none;
        background: var(--input-bg);
        color: var(--text);
        font: inherit;
        font-size: 12px;
    }

.select2-dropdown .select2-results__option {
    padding: 10px 12px;
    color: var(--text);
    font-size: 12px;
}

.select2-dropdown .select2-results__option--selected {
    background: rgba(113,103,255,.12);
    color: var(--text);
}

.select2-dropdown .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--accent);
    color: #fff;
}

html[data-theme="light"] .select2-dropdown.rc-select2-dropdown {
    background: var(--surface);
}

html[data-theme="light"] .select2-dropdown .select2-results__option--selected {
    color: var(--text);
}

.rc-page .form-message {
    margin-top: 10px;
    padding: 9px 11px;
    font-size: 11px;
}

.rc-samples {
    margin-top: 14px;
    border-top: 1px solid var(--border);
}

    .rc-samples > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 13px 0 0;
        color: var(--muted);
        font-size: 11px;
        font-weight: 650;
        list-style: none;
        cursor: pointer;
    }

        .rc-samples > summary::-webkit-details-marker {
            display: none;
        }

        .rc-samples > summary > span {
            display: flex;
            align-items: center;
            gap: 8px;
        }

            .rc-samples > summary > span i {
                color: var(--accent);
            }

.rc-samples-chevron {
    font-size: 10px;
    transition: transform .2s ease;
}

.rc-samples[open] .rc-samples-chevron {
    transform: rotate(180deg);
}

.rc-page .sample-files-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 8px;
    margin-top: 12px;
}

.rc-page .sample-file-button {
    min-height: 51px;
    padding: 8px 10px;
    gap: 9px;
    border-radius: 9px;
}

.rc-page .sample-file-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
}

.rc-page .sample-file-content strong {
    font-size: 10px;
}

.rc-page .sample-file-content small {
    font-size: 9px;
}

.rc-history-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

    .rc-history-heading h2 {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        color: var(--text);
        font-size: 15px;
        font-weight: 700;
    }

        .rc-history-heading h2 i {
            color: var(--accent);
            font-size: 13px;
        }

    .rc-history-heading .history-count {
        flex-shrink: 0;
        padding: 5px 8px;
        border: 1px solid var(--border);
        border-radius: 6px;
        font-size: 9px;
    }

.rc-history-list {
    display: flex;
    flex-direction: column;
}

.rc-history-item {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(75px, .6fr);
    align-items: center;
    gap: 14px;
    padding: 11px 2px;
    border-bottom: 1px solid var(--border);
}

    .rc-history-item:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

.rc-history-vehicle,
.rc-history-format,
.rc-history-status {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.rc-history-label {
    color: var(--muted-2);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .8px;
}

.rc-history-vehicle > strong,
.rc-history-format > strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
}

.rc-history-vehicle > strong {
    padding: 4px 7px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    background: var(--surface-2);
    letter-spacing: .4px;
}

.rc-history-vehicle > small,
.rc-history-format > small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.rc-history-status .status {
    font-size: 9px;
}

.rc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 23px 10px;
    text-align: center;
}

    .rc-empty-state > i {
        margin-bottom: 4px;
        color: var(--muted-2);
        font-size: 22px;
    }

    .rc-empty-state > strong {
        color: var(--text);
        font-size: 12px;
    }

    .rc-empty-state > span {
        color: var(--muted);
        font-size: 10px;
    }

@media (max-width: 900px) {
    .rc-page .rc-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px;
    }

        .rc-page .rc-form .button-field {
            grid-column: 1 / -1;
        }

    .rc-page .rc-download-button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .rc-page {
        width: 100%;
    }

    .rc-page-header {
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }

        .rc-page-header h1 {
            font-size: 20px;
            letter-spacing: -.5px;
        }

    .rc-page .rc-wallet {
        width: auto;
        flex-shrink: 0;
        gap: 8px;
        padding: 8px;
    }

    .rc-wallet-info > span {
        font-size: 7px;
        letter-spacing: .6px;
    }

    .rc-wallet-info > strong {
        font-size: 15px;
    }

    .rc-wallet .wallet-add-money-button {
        gap: 5px;
        padding: 7px 8px;
        font-size: 9px;
    }

    .rc-page .surface-card {
        margin-bottom: 10px;
        padding: 13px;
        border-radius: 11px;
    }

    .rc-card-title {
        margin-bottom: 11px;
    }

    .rc-page .rc-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 11px;
    }

        .rc-page .rc-form .button-field {
            grid-column: auto;
        }

    .rc-page .form-field label {
        font-size: 10px;
    }

    .rc-page .form-input,
    .rc-page .select2-container .select2-selection--single {
        height: 42px;
        font-size: 12px;
    }

    .rc-page .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 40px;
    }

    .rc-history-heading {
        margin-bottom: 4px;
    }

        .rc-history-heading h2 {
            font-size: 13px;
        }

    .rc-history-item {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
        gap: 8px;
        padding: 10px 0;
    }

    .rc-history-label {
        font-size: 7px;
        letter-spacing: .35px;
    }

    .rc-history-vehicle > strong,
    .rc-history-format > strong {
        font-size: 10px;
    }

    .rc-history-vehicle > small,
    .rc-history-format > small {
        font-size: 8px;
    }

    .rc-history-status .status {
        gap: 4px;
        font-size: 8px;
    }

    .rc-page .sample-files-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 360px) {
    .rc-page-header h1 {
        font-size: 18px;
    }

    .rc-page .rc-wallet {
        gap: 6px;
        padding: 7px;
    }

    .rc-wallet-info > strong {
        font-size: 13px;
    }

    .rc-wallet .wallet-add-money-button {
        font-size: 8px;
    }

    .rc-history-item {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
    }

    .rc-history-status {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-top: 5px;
        border-top: 1px dashed var(--border);
    }
}

/* ================================
   PROFILE PAGE
================================ */

.profile-page {
    max-width: 1180px;
    margin-inline: auto;
    padding-bottom: 24px;
}

.profile-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

    .profile-page-header h1 {
        margin: 3px 0 4px;
        font-size: clamp(1.35rem, 2.5vw, 1.75rem);
        font-weight: 750;
        letter-spacing: -0.035em;
        color: var(--text);
    }

    .profile-page-header p,
    .profile-section-description {
        margin: 0;
        color: var(--muted);
        font-size: 0.86rem;
        line-height: 1.5;
    }

.profile-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 16px;
}

.profile-overview-card,
.profile-wallet-card,
.profile-history-card,
.profile-security-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
}

.profile-identity {
    min-width: 0;
}

    .profile-identity h2 {
        margin: 0 0 5px;
        color: var(--text);
        font-size: 1.1rem;
        font-weight: 750;
        overflow-wrap: anywhere;
    }

.profile-member-label {
    color: var(--muted);
    font-size: 0.8rem;
}

.profile-divider {
    height: 1px;
    margin: 18px 0;
    background: var(--border);
}

.profile-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

    .profile-field > span,
    .profile-transaction-financials > div > span,
    .profile-transaction-description > span {
        color: var(--muted-2);
        font-size: 0.68rem;
        font-weight: 750;
        letter-spacing: 0.07em;
    }

    .profile-field strong {
        color: var(--text);
        font-size: 0.9rem;
        font-weight: 650;
        overflow-wrap: anywhere;
    }

.profile-email {
    word-break: break-word;
}

/* WALLET */

.profile-wallet-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    background: radial-gradient( ellipse at top right, color-mix(in srgb, var(--accent) 12%, transparent), transparent 65% ), var(--surface);
}

.profile-wallet-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

    .profile-wallet-heading h2 {
        margin: 4px 0 0;
        color: var(--text);
        font-size: 1rem;
        font-weight: 700;
    }

.profile-wallet-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-2);
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 800;
}

.profile-wallet-value {
    color: var(--text);
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

    .profile-wallet-value > span {
        margin-right: 2px;
        font-size: 0.72em;
    }

.profile-wallet-description {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.profile-wallet-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.wallet-help-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

    .wallet-help-content strong {
        color: var(--text);
        font-size: 0.85rem;
    }

    .wallet-help-content span {
        color: var(--muted);
        font-size: 0.77rem;
        line-height: 1.45;
    }

.profile-wallet-note .whatsapp-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* WALLET HISTORY */

.profile-history-card {
    margin-bottom: 16px;
}

.profile-history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

    .profile-history-header h2 {
        margin: 4px 0 5px;
        color: var(--text);
        font-size: 1.08rem;
        font-weight: 750;
    }

.profile-section-description {
    font-size: 0.8rem;
}

.profile-history-header .history-count {
    flex: 0 0 auto;
}

.profile-transaction-list {
    display: flex;
    flex-direction: column;
}

.profile-transaction {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 15px 0;
    border-top: 1px solid var(--border);
}

.profile-transaction-main,
.profile-transaction-type,
.profile-transaction-financials,
.profile-transaction-amount,
.profile-transaction-balance,
.profile-transaction-description {
    min-width: 0;
}

.profile-transaction-type {
    display: flex;
    align-items: center;
    gap: 11px;
}

.profile-transaction-indicator {
    display: flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 1.25rem;
    font-weight: 800;
}

    .profile-transaction-indicator.is-credit {
        background: color-mix(in srgb, var(--success) 12%, transparent);
        color: var(--success);
    }

    .profile-transaction-indicator.is-debit {
        background: color-mix(in srgb, var(--danger) 12%, transparent);
        color: var(--danger);
    }

.profile-transaction-type > div,
.profile-transaction-amount,
.profile-transaction-balance {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-transaction-type strong {
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.profile-transaction-type > div > span {
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.45;
}

.profile-transaction-financials {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.profile-transaction-amount strong,
.profile-transaction-balance strong {
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.profile-transaction-amount .transaction-credit {
    color: var(--success);
}

.profile-transaction-amount .transaction-debit {
    color: var(--danger);
}

.profile-transaction-description p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* EMPTY HISTORY */

.profile-empty-state {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 7px;
    padding: 28px 16px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.profile-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 4px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 1.25rem;
    font-weight: 800;
}

.profile-empty-state strong {
    color: var(--text);
    font-size: 0.9rem;
}

.profile-empty-state span {
    color: var(--muted);
    font-size: 0.82rem;
}

/* SECURITY */

.profile-security-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.profile-security-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.profile-security-icon {
    display: flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-2);
    color: var(--accent);
    font-size: 1.1rem;
}

.profile-security-info h2 {
    margin: 4px 0;
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 750;
}

.profile-security-info p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.profile-password-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .profile-overview-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-transaction {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 14px;
    }

    .profile-transaction-description {
        grid-column: 1 / -1;
        padding-left: 47px;
    }
}

@media (max-width: 560px) {
    .profile-page-header {
        margin-bottom: 14px;
    }

        .profile-page-header p {
            font-size: 0.8rem;
        }

    .profile-overview-grid {
        gap: 12px;
        margin-bottom: 12px;
    }

    .profile-overview-card,
    .profile-wallet-card,
    .profile-history-card,
    .profile-security-card {
        padding: 15px;
        border-radius: 14px;
    }

    .profile-fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .profile-wallet-note {
        align-items: stretch;
        flex-direction: column;
    }

        .profile-wallet-note .whatsapp-button {
            width: 100%;
        }

    .profile-history-card {
        margin-bottom: 12px;
    }

    .profile-history-header h2 {
        font-size: 1rem;
    }

    .profile-transaction {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 15px 0;
    }

    .profile-transaction-financials {
        padding-left: 47px;
    }

    .profile-transaction-description {
        grid-column: auto;
        padding-left: 47px;
    }

    .profile-security-card {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .profile-password-button {
        width: 100%;
    }
}

/* ================================
   WALLET BALANCE STATUS
================================ */

.profile-wallet-value.balance-zero {
    color: var(--danger);
}

.profile-wallet-value.balance-low {
    color: #d99a00;
}

.profile-wallet-value.balance-healthy {
    color: var(--success);
}

html[data-theme="light"] .profile-wallet-value.balance-low {
    color: #a66b00;
}

/* ================================
   RESPONSIVE TRANSACTION GRID
================================ */

.profile-transaction-list {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-transaction {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}

.profile-transaction-main,
.profile-transaction-type,
.profile-transaction-financials,
.profile-transaction-amount,
.profile-transaction-balance,
.profile-transaction-description {
    min-width: 0;
    max-width: 100%;
}

.profile-transaction-type {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .profile-transaction-type > div {
        flex: 1;
        min-width: 0;
    }

        .profile-transaction-type strong,
        .profile-transaction-type > div > span {
            display: block;
            overflow-wrap: anywhere;
        }

        .profile-transaction-type > div > span {
            margin-top: 4px;
        }

.profile-transaction-financials {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.profile-transaction-amount,
.profile-transaction-balance {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .profile-transaction-amount strong,
    .profile-transaction-balance strong {
        overflow-wrap: anywhere;
        word-break: break-word;
        font-variant-numeric: tabular-nums;
    }

.profile-transaction-description p {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Tablet: transaction identity on first row,
   financial details and description below */
@media (max-width: 900px) {
    .profile-transaction {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 14px 16px;
    }

    .profile-transaction-main {
        grid-column: 1 / -1;
    }

    .profile-transaction-financials {
        grid-column: 1 / -1;
        padding-left: 46px;
    }

    .profile-transaction-description {
        grid-column: 1 / -1;
        padding-left: 46px;
    }
}

/* Mobile: compact, readable transaction cards */
@media (max-width: 560px) {
    .profile-transaction {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 14px 0;
    }

    .profile-transaction-main,
    .profile-transaction-financials,
    .profile-transaction-description {
        grid-column: 1;
    }

    .profile-transaction-financials {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding-left: 46px;
    }

    .profile-transaction-description {
        padding-left: 46px;
    }

    .profile-transaction-amount strong,
    .profile-transaction-balance strong {
        font-size: 0.82rem;
    }

    .profile-transaction-financials > div > span,
    .profile-transaction-description > span {
        font-size: 0.64rem;
    }
}

/* Very narrow screens */
@media (max-width: 360px) {
    .profile-transaction-financials {
        grid-template-columns: minmax(0, 1fr);
    }
}

.download-summary {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 110px;
}

.download-total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.download-format-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 220px;
}

.download-format-count {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

.download-empty {
    color: var(--muted-2);
    font-size: 0.75rem;
}

.original-format-setting {
    margin: 20px 0;
}

.original-format-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
}

    .original-format-label > span:first-child {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .original-format-label strong {
        font-size: 0.95rem;
        font-weight: 600;
    }

    .original-format-label small {
        color: var(--text-muted, #777);
        font-size: 0.8rem;
        line-height: 1.4;
    }

.toggle-switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
}

    .toggle-switch input {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
    }

.toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background-color: #9ca3af;
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

    .toggle-slider::before {
        position: absolute;
        content: "";
        width: 20px;
        height: 20px;
        left: 3px;
        top: 3px;
        background-color: #fff;
        border-radius: 50%;
        transition: transform 0.2s ease;
    }

.toggle-switch input:checked + .toggle-slider {
    background-color: #16a34a;
}

    .toggle-switch input:checked + .toggle-slider::before {
        transform: translateX(20px);
    }

.toggle-switch input:focus-visible + .toggle-slider {
    outline: 2px solid var(--primary-color, #2563eb);
    outline-offset: 3px;
}

.toggle-switch input:disabled + .toggle-slider {
    cursor: wait;
    opacity: 0.65;
}

.original-format-status {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    min-height: 1em;
}

    .original-format-status:empty {
        display: none;
    }

    .original-format-status.status-success {
        color: #16a34a;
    }

    .original-format-status.status-error {
        color: #dc2626;
    }