/* ============================================================
   Kitadi App — Refined Fintech CSS
   Brand: Bahnschrift · #FF6B35 orange · #1A237E navy
   Light theme with premium fintech aesthetic
   ============================================================ */

@font-face {
    font-family: 'Bahnschrift';
    src: url('../fonts/Bahnschrift.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ─── Design Tokens ──────────────────────────────────────────── */
:root {
    --kitadi-orange: #FF6B35;
    --kitadi-orange-dark: #E55A2B;
    --kitadi-navy: #1A237E;

    /* Surfaces */
    --bg-page: #F4F6FB;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FAFBFE;
    --bg-nav: #FFFFFF;
    --bg-header: #FFFFFF;

    /* Borders */
    --border-subtle: #EAEEf7;
    --border-card: #E4E8F0;
    --border-focus: var(--kitadi-orange);

    /* Text */
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;

    /* Legacy aliases */
    --bg-primary: var(--bg-page);
    --bg-secondary: var(--bg-card);
    --card-bg: var(--bg-card);
    --card-bg-hover: var(--bg-card-hover);
    --card-border: var(--border-card);
    --border-color: var(--border-card);
    --hover-bg: rgba(255,107,53,0.05);

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.05), 0 2px 10px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
    --shadow-orange: 0 4px 16px rgba(255,107,53,0.28);
    --shadow-orange-lg: 0 8px 24px rgba(255,107,53,0.36);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Status */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
}

/* ─── Dark Mode ───────────────────────────────────────────────── */
body.dark-mode {
    --bg-page: #0D1117;
    --bg-card: #161B22;
    --bg-card-hover: #1C2128;
    --bg-nav: #161B22;
    --bg-header: #0D1117;

    --border-subtle: rgba(255,255,255,0.07);
    --border-card: rgba(255,255,255,0.1);

    --text-primary: #E6EDF3;
    --text-secondary: #8B949E;
    --text-muted: #6E7681;

    /* Legacy aliases */
    --bg-primary: var(--bg-page);
    --bg-secondary: var(--bg-card);
    --card-bg: var(--bg-card);
    --card-bg-hover: var(--bg-card-hover);
    --card-border: var(--border-card);
    --border-color: var(--border-card);
    --hover-bg: rgba(255,255,255,0.05);

    --shadow-sm: 0 1px 4px rgba(0,0,0,0.3), 0 2px 10px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.4);
}

html.dark-mode, body.dark-mode {
    background: #0D1117 !important;
}

body.dark-mode .app-main,
body.dark-mode .app-content {
    background: transparent !important;
}

body.dark-mode .app-header {
    background: #0D1117 !important;
    border-bottom-color: rgba(255,107,53,0.4) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4) !important;
}

body.dark-mode .header-top {
    background: transparent !important;
}

body.dark-mode .header-nav {
    background: #161B22 !important;
    border-top-color: rgba(255,255,255,0.06) !important;
}

body.dark-mode .card,
body.dark-mode .card:hover {
    background: var(--bg-card) !important;
    border-color: var(--border-card) !important;
}

body.dark-mode .card-header {
    background: rgba(255,255,255,0.02) !important;
    border-bottom-color: var(--border-subtle) !important;
}

body.dark-mode .card-content,
body.dark-mode .card .content {
    background: transparent !important;
}

body.dark-mode .quick-ops-toggle-label {
    background: var(--bg-card) !important;
    border-color: var(--border-card) !important;
}
body.dark-mode .quick-ops-toggle-label .quick-ops-title {
    color: var(--text-primary) !important;
}
body.dark-mode .quick-ops-toggle-label .quick-ops-desc {
    color: var(--text-secondary) !important;
}

body.dark-mode .user-menu-dropdown-content {
    background: #1C2128;
    border-color: rgba(255,255,255,0.12);
}

body.dark-mode .user-menu-item {
    background: transparent;
    color: var(--text-primary);
}

body.dark-mode .user-menu-item:hover {
    background: rgba(255,255,255,0.06);
}

body.dark-mode .user-menu-item-danger:hover {
    background: rgba(239,68,68,0.12);
}

body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .form-textarea {
    background: rgba(22,27,34,0.9) !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: var(--text-primary) !important;
}

body.dark-mode .form-input:focus,
body.dark-mode .form-select:focus,
body.dark-mode .form-textarea:focus {
    background: rgba(28,33,40,0.95) !important;
    border-color: var(--kitadi-orange) !important;
    box-shadow: 0 0 0 3px rgba(255,107,53,0.15) !important;
    color: var(--text-primary) !important;
}

body.dark-mode .form-input::placeholder,
body.dark-mode .form-textarea::placeholder {
    color: var(--text-muted) !important;
}

body.dark-mode .form-select option {
    background: #1C2128 !important;
    color: var(--text-primary) !important;
}

body.dark-mode .form-label {
    color: var(--text-primary) !important;
}

body.dark-mode .btn-outline {
    border-color: var(--kitadi-orange);
    color: var(--kitadi-orange);
    background: transparent;
}

body.dark-mode .btn-outline:hover {
    background: rgba(255,107,53,0.15);
    color: #fff;
}

body.dark-mode .table th,
body.dark-mode .table td {
    border-color: var(--border-subtle) !important;
}

body.dark-mode .table thead {
    background: rgba(255,255,255,0.03) !important;
}

body.dark-mode .table th {
    color: var(--text-primary) !important;
}

body.dark-mode .table td {
    color: var(--text-secondary) !important;
}

body.dark-mode .table tbody tr:hover {
    background: rgba(255,255,255,0.04) !important;
}

body.dark-mode .section-title {
    color: var(--text-primary) !important;
}

body.dark-mode .stats-grid .card {
    background: var(--bg-card) !important;
}

body.dark-mode .nav-link--kyc {
    background: rgba(245,158,11,0.12);
    border-color: rgba(245,158,11,0.4);
    color: #FCD34D;
}

body.dark-mode .action-tile {
    background: var(--bg-card) !important;
    border-color: var(--border-card) !important;
    color: var(--text-primary) !important;
}

body.dark-mode .action-tile:hover {
    background: var(--bg-card-hover) !important;
    border-color: rgba(255,107,53,0.3) !important;
}

body.dark-mode .action-tile--kyc {
    background: rgba(245,158,11,0.12) !important;
    border-color: rgba(245,158,11,0.4) !important;
}

body.dark-mode .action-tile__label {
    color: var(--text-secondary) !important;
}

body.dark-mode .action-card {
    background: var(--bg-card) !important;
}

body.dark-mode .action-card:hover {
    background: var(--bg-card-hover) !important;
}

body.dark-mode .merchant-nav-dropdown-content {
    background: #1C2128;
    border-color: rgba(255,255,255,0.12);
}

body.dark-mode .merchant-nav-dropdown-content::before {
    background: #1C2128;
}

body.dark-mode .header-nav .icon,
body.dark-mode .header-top .icon,
body.dark-mode .user-menu-item .icon,
body.dark-mode .card-title-icon,
body.dark-mode .action-tile__icon {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

body.dark-mode .action-tile--kyc .action-tile__icon {
    filter: none;
    opacity: 1;
}

body.dark-mode .nav-link.active .icon,
body.dark-mode .nav-link:hover .icon {
    opacity: 1;
}

body.dark-mode .nav-link-dark-toggle:hover {
    background: var(--hover-bg);
}

body.dark-mode .tabs-list {
    border-bottom-color: var(--border-card) !important;
}

/* op-auth-link */
.op-auth-link {
    color: var(--kitadi-orange);
    text-decoration: none;
    font-weight: 500;
}
.op-auth-link:hover { text-decoration: underline; }
body.dark-mode .op-auth-link { color: #FF9F7A; }
body.dark-mode .op-auth-link:hover { color: #FFB088; }

/* ─── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Bahnschrift', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-page);
    background-image:
        radial-gradient(ellipse 70% 50% at 0% 0%, rgba(26,35,126,0.04) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(255,107,53,0.04) 0%, transparent 70%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* ─── Layout ──────────────────────────────────────────────────── */
.app-container {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

.app-main {
    flex: 1;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ─── Sidebar ─────────────────────────────────────────────────── */
.app-sidebar {
    width: 256px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-card);
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.app-sidebar.collapsed { width: 80px; }

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo-text h1 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--kitadi-navy);
    margin: 0;
    letter-spacing: -0.02em;
}

.sidebar-logo-text p {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.375rem;
    color: var(--kitadi-orange);
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: background 0.15s;
}

.sidebar-toggle:hover { background: rgba(255,107,53,0.08); }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0;
}

.menu-section { padding: 0.75rem 0; }

.menu-section-title {
    padding: 0.375rem 1.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}

.menu-section-title:hover { color: var(--text-secondary); }

.menu-section-title .chevron {
    transition: transform 0.2s;
    width: 14px;
    height: 14px;
}

.menu-section-title.collapsed .chevron { transform: rotate(-90deg); }

.menu-items { margin-top: 0.25rem; }

.menu-section.collapsed .menu-items { display: none; }

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
    position: relative;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.menu-item:hover {
    background: rgba(255,107,53,0.06);
    color: var(--kitadi-orange);
}

.menu-item.active {
    background: rgba(255,107,53,0.08);
    color: var(--kitadi-orange);
    font-weight: 600;
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--kitadi-orange);
    border-radius: 0 3px 3px 0;
}

.menu-item-icon {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    flex-shrink: 0;
    opacity: 0.65;
    transition: opacity 0.15s;
}

.menu-item:hover .menu-item-icon,
.menu-item.active .menu-item-icon { opacity: 1; }

.app-sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 0.75rem;
}

.app-sidebar.collapsed .menu-item-text { display: none; }
.app-sidebar.collapsed .menu-item-icon { margin-right: 0; }

/* ─── Header ──────────────────────────────────────────────────── */
.app-header {
    background: var(--bg-header);
    border-bottom: 2px solid var(--kitadi-orange);
    box-shadow: 0 1px 8px rgba(0,0,0,0.06), 0 2px 16px rgba(0,0,0,0.04);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 60px;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .header-top {
        padding: 0 1.5rem;
        height: 64px;
        border-bottom: 1px solid var(--border-subtle);
    }
}

@media (min-width: 1024px) {
    .header-top { padding: 0 2rem; }
}

.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: block;
}

.header-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: flex-end;
    position: relative;
}

/* ─── User Menu ───────────────────────────────────────────────── */
.user-menu-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 300;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    color: var(--text-primary);
}

.user-menu-trigger:hover {
    background: rgba(255,107,53,0.06);
    border-color: rgba(255,107,53,0.2);
}

.user-info-text {
    text-align: right;
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--kitadi-orange);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.user-menu-dropdown-content {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #FFFFFF;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 210px;
    padding: 0.375rem;
    display: none;
    z-index: 400;
    flex-direction: column;
    pointer-events: auto;
}

.user-menu-dropdown-content.show {
    display: flex;
    animation: dropdownIn 0.16s ease-out;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5625rem 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 7px;
    transition: background 0.12s;
    font-size: 0.875rem;
    font-weight: 500;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.user-menu-item:hover {
    background: #F4F6FB;
    color: var(--text-primary);
}

.user-menu-item .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.65;
    transition: opacity 0.12s;
}

.user-menu-item:hover .icon { opacity: 1; }

.user-menu-item-danger { color: #DC2626; }
.user-menu-item-danger:hover {
    background: rgba(220,38,38,0.06);
    color: #DC2626;
}

.user-menu-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0.25rem 0;
}

/* btn-logout */
.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    background: transparent;
    border: 1px solid var(--border-card);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
    cursor: pointer;
    font-family: inherit;
}

.btn-logout:hover {
    background: rgba(255,107,53,0.06);
    border-color: rgba(255,107,53,0.3);
    color: var(--kitadi-orange);
}

.btn-logout .icon { width: 16px; height: 16px; }
.logout-text { display: none; }

/* ─── Header Nav ──────────────────────────────────────────────── */
.header-nav {
    display: flex;
    flex-direction: row;
    width: 100%;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-nav);
    padding: 0 0.75rem;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
}

.header-nav::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
    .header-nav { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
    .header-nav { padding: 0 2rem; }
}

.header-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.4375rem;
    padding: 0.625rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: none;
    cursor: pointer;
    font-family: inherit;
    border-radius: 0;
}

.header-nav .nav-link:hover {
    color: var(--kitadi-orange);
    background: rgba(255,107,53,0.04);
    border-radius: 5px 5px 0 0;
}

.header-nav .nav-link.active {
    color: var(--kitadi-orange);
    font-weight: 600;
    border-bottom-color: var(--kitadi-orange);
}

.header-nav .nav-link .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.header-nav .nav-link:hover .icon,
.header-nav .nav-link.active .icon { opacity: 1; }

.header-nav .nav-link.nav-link--kyc {
    background: rgba(245,158,11,0.06);
    border-radius: 5px 5px 0 0;
    color: #D97706;
}

.header-nav .nav-link.nav-link--kyc:hover,
.header-nav .nav-link.nav-link--kyc.active {
    background: rgba(245,158,11,0.1);
    color: #B45309;
    border-bottom-color: #D97706;
}

.header-nav .nav-link.nav-link--kyc .icon { opacity: 1; }

/* Merchant nav dropdown button */
.nav-link-btn { pointer-events: auto; cursor: pointer; }
.nav-link-btn .icon-chevron-down { transition: transform 0.2s ease; }
.nav-link-btn[aria-expanded="true"] .icon-chevron-down { transform: rotate(180deg); }

/* Merchant dropdown */
.merchant-nav-dropdown-content {
    position: fixed;
    min-width: 220px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    padding: 0.375rem;
    display: none;
    flex-direction: column;
}

.merchant-nav-dropdown-content.show {
    display: flex !important;
    animation: dropdownIn 0.16s ease-out;
}

.merchant-nav-dropdown-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #FFFFFF;
    border-radius: var(--radius-md);
    z-index: -1;
}

.merchant-nav-dropdown-content .user-menu-item {
    white-space: nowrap;
    font-size: 0.875rem;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    background: transparent;
    border: 1px solid var(--border-card);
    padding: 0.4375rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border-radius: 6px;
    transition: all 0.15s;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    border-color: var(--kitadi-orange);
    color: var(--kitadi-orange);
}

.mobile-menu-toggle .icon { width: 22px; height: 22px; }

/* Mobile nav */
@media (max-width: 767px) {
    .mobile-menu-toggle { display: none; }

    .header-nav {
        display: flex;
        padding: 0 0.25rem;
        justify-content: space-around;
    }

    .header-nav .nav-link {
        flex: 1;
        justify-content: center;
        padding: 0.625rem 0.25rem;
        min-width: 0;
        border-radius: 0;
    }

    .header-nav .nav-link span:not(.icon) { display: none; }
    .header-nav .nav-link .icon {
        margin: 0;
        width: 22px;
        height: 22px;
        opacity: 0.65;
    }
    .header-nav .nav-link.active .icon { opacity: 1; }

    .header-nav .nav-link-dark-toggle .dark-mode-toggle-label { display: none; }
    .header-nav .nav-link-dark-toggle {
        flex: 0;
        min-width: 44px;
    }
}

@media (min-width: 768px) {
    .app-header {
        display: flex;
        flex-direction: column;
    }

    .mobile-menu-toggle { display: none; }

    .header-nav {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
        max-height: none !important;
        overflow-x: auto;
    }

    .header-user-info { gap: 0.75rem; }
    .logout-text { display: inline; }
}

/* ─── Main Content ────────────────────────────────────────────── */
.app-content {
    flex: 1;
    padding: 1rem;
    background: transparent;
    min-height: 0;
}

@media (min-width: 768px) { .app-content { padding: 1.5rem; } }
@media (min-width: 1024px) { .app-content { padding: 2rem; } }

/* ─── Cards ───────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-card);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(255,107,53,0.18);
    transform: translateY(-2px);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
}

.card-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    letter-spacing: -0.01em;
}

.card-title-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.75;
}

.card-description {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.card-content {
    padding: 1.5rem;
    background: transparent;
}

.card .content { background: transparent; }

/* ─── Balance ─────────────────────────────────────────────────── */
.balance-amount {
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--kitadi-orange) 0%, var(--kitadi-orange-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    margin: 0.5rem 0 0.25rem;
    line-height: 1.1;
}

/* ─── Stats ───────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card { text-align: center; }

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--kitadi-orange), var(--kitadi-orange-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ─── Section Titles ──────────────────────────────────────────── */
.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.01em;
}

.section-title::before {
    content: '';
    flex-shrink: 0;
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--kitadi-orange), var(--kitadi-orange-dark));
    border-radius: 2px;
}

/* ─── Cards Grid ──────────────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ─── Action Cards ────────────────────────────────────────────── */
.action-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-card);
    background: var(--bg-card);
}

.action-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--kitadi-orange), var(--kitadi-navy));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.action-card:hover::after { transform: scaleX(1); }

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255,107,53,0.12), 0 2px 6px rgba(0,0,0,0.06);
    border-color: rgba(255,107,53,0.22);
    background: var(--bg-card-hover);
}

.action-card:active { transform: scale(0.98); transition: transform 0.1s; }

.action-card .card-header { position: relative; }

.action-card .card-title-icon {
    width: 32px;
    height: 32px;
    padding: 6px;
    border-radius: var(--radius-sm);
    background-color: rgba(255,107,53,0.08);
    background-size: 20px 20px;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.action-card:hover .card-title-icon {
    background-color: rgba(255,107,53,0.14);
}

.action-card .card-content p {
    color: var(--text-secondary);
    margin: 0.75rem 0 1rem;
    font-size: 0.875rem;
}

.action-card .btn {
    font-weight: 600;
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    border: 2px solid transparent;
    text-decoration: none;
    font-family: inherit;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--kitadi-orange);
    color: #FFFFFF;
    border-color: var(--kitadi-orange);
    box-shadow: 0 2px 8px rgba(255,107,53,0.22);
}

.btn-primary:hover {
    background: var(--kitadi-orange-dark);
    border-color: var(--kitadi-orange-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-orange);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
    background: #FFFFFF;
    border-color: var(--kitadi-orange);
    color: var(--kitadi-orange);
}

.btn-outline:hover {
    background: var(--kitadi-orange);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,107,53,0.2);
}

.btn-outline:active { transform: translateY(0); }

.btn-danger {
    background: var(--error);
    color: #FFFFFF;
    border-color: var(--error);
    box-shadow: 0 2px 8px rgba(239,68,68,0.2);
}

.btn-danger:hover {
    background: #DC2626;
    border-color: #DC2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239,68,68,0.3);
}

.btn-danger:active { transform: translateY(0); }

.btn-sm {
    padding: 0.4375rem 0.875rem;
    font-size: 0.8125rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon { width: 18px; height: 18px; }

/* ─── Forms ───────────────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group { margin-bottom: 1rem; }

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4375rem;
    letter-spacing: 0.005em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.6875rem 0.875rem;
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #FFFFFF;
    color: var(--text-primary);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--kitadi-orange);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
    background: #FFFFFF;
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

/* ─── Alerts ──────────────────────────────────────────────────── */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-error {
    background: #FEF2F2;
    color: #DC2626;
    border-color: #FECACA;
}

.alert-success {
    background: #F0FDF4;
    color: #16A34A;
    border-color: #BBF7D0;
}

.alert-warning {
    background: #FFFBEB;
    color: #D97706;
    border-color: #FDE68A;
}

.alert-info {
    background: #EFF6FF;
    color: #2563EB;
    border-color: #BFDBFE;
}

/* ─── Badges ──────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge-success {
    background: #DCFCE7;
    color: #15803D;
    border: 1px solid #BBF7D0;
}

.badge-warning {
    background: #FEF3C7;
    color: #B45309;
    border: 1px solid #FDE68A;
}

.badge-error {
    background: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.badge-info {
    background: #DBEAFE;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
}

/* ─── Tables ──────────────────────────────────────────────────── */
.table-container { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead { background: #FAFBFE; }

.table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-card);
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.875rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr {
    transition: background 0.12s;
}

.table tbody tr:hover { background: rgba(255,107,53,0.03); }

/* ─── Tabs ────────────────────────────────────────────────────── */
.tabs { width: 100%; }

.tabs-list {
    display: flex;
    border-bottom: 2px solid var(--border-card);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs-list::-webkit-scrollbar { display: none; }

.tab-trigger {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    font-family: inherit;
}

.tab-trigger:hover { color: var(--kitadi-orange); }

.tab-trigger.active {
    color: var(--kitadi-orange);
    border-bottom-color: var(--kitadi-orange);
    font-weight: 600;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Mobile Action Tiles ─────────────────────────────────────── */
.action-tiles-mobile { display: none; }

@media (max-width: 767px) {
    .action-tiles-mobile {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .action-tile {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.5625rem;
        padding: 1.125rem 0.375rem;
        min-height: 96px;
        background: var(--bg-card);
        border: 1px solid var(--border-card);
        border-radius: var(--radius-md);
        text-decoration: none;
        color: var(--text-primary);
        font-size: 0.75rem;
        font-weight: 500;
        transition: all 0.15s;
        -webkit-tap-highlight-color: transparent;
        box-shadow: var(--shadow-xs);
    }

    .action-tile:active { transform: scale(0.95); }

    .action-tile:hover {
        border-color: rgba(255,107,53,0.25);
        box-shadow: 0 4px 12px rgba(255,107,53,0.1);
    }

    .action-tile__icon {
        width: 40px;
        height: 40px;
        background-size: 22px 22px;
        background-position: center;
        background-repeat: no-repeat;
        background-color: rgba(255,107,53,0.07);
        border-radius: var(--radius-sm);
        flex-shrink: 0;
        transition: background-color 0.15s;
    }

    .action-tile:hover .action-tile__icon {
        background-color: rgba(255,107,53,0.13);
    }

    .action-tile__label {
        text-align: center;
        line-height: 1.3;
        color: var(--text-secondary);
    }

    .action-tile--kyc {
        border-color: rgba(245,158,11,0.35);
        background: rgba(245,158,11,0.04);
    }

    .action-tile--kyc .action-tile__icon.icon {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23D97706' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
        background-color: rgba(245,158,11,0.08);
    }

    .dashboard-actions-desktop { display: none; }

    .app-content { padding: 0.875rem; }

    .card { margin-bottom: 0.875rem; }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .card .card-header { padding: 1rem; }
    .card .card-content { padding: 1rem; }
    .card .card-description { display: none; }

    .balance-amount { font-size: 1.75rem; }
}

@media (min-width: 768px) {
    .action-tiles-mobile { display: none; }
    .dashboard-actions-desktop { display: block; }
}

/* ─── Icons ───────────────────────────────────────────────────── */
.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.icon-link {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
}

/* ─── Utility ─────────────────────────────────────────────────── */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.25);
    border-top-color: var(--kitadi-orange);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
    background: linear-gradient(90deg, #F0F3FA 25%, #E8ECF4 50%, #F0F3FA 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

.modal { animation: modalIn 0.22s ease-out; }

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(-10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.notification { animation: slideInRight 0.3s ease-out; }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

.alert { animation: fadeDown 0.25s ease-out; }

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.badge-notification { animation: badgePulse 2s ease-in-out infinite; }

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.08); }
}

.icon-spin { animation: spin 1s linear infinite; }

.collapse {
    transition: height 0.25s ease, opacity 0.25s ease;
}

.progress-bar { animation: progressFill 0.8s ease-out forwards; }

@keyframes progressFill { from { width: 0; } }

.lift-on-hover { transition: all 0.2s ease; }
.lift-on-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Page content fade in */
.app-content {
    animation: contentIn 0.3s ease-out both;
}

@keyframes contentIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; }
}

/* ─── Reduced Motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
