/* ====================================================================
   ESHTIWE REMITTANCE & FX SYSTEM - CLASSIC LIGHT FINTECH DESIGN
   Calm, Prestigious, Light & Classic Aesthetics (Pearl, Emerald & Gold)
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Calm & Classic Color Palette */
    --bg-universe: #f1f4f8;          /* خلفية الصفحة العامة المريحة */
    --bg-phone: #f8fafc;             /* خلفية شاشة التطبيق الهادئة */
    --bg-card: #ffffff;              /* بطاقات بيضاء نقية مع ظل خفيف */
    --bg-card-hover: #fbfcfd;
    --bg-surface: #ffffff;
    --bg-input: #ffffff;             /* حقول إدخال بيضاء ناصعة */
    --bg-subtle: #f1f5f9;

    /* Classic Royal Green & Emerald (أخضر كلاسيكي هادئ ومريح للعين) */
    --primary: #059669;
    --primary-hover: #047857;
    --primary-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
    --primary-glow: rgba(5, 150, 105, 0.22);
    --primary-light: #ecfdf5;

    /* Classic Accents (لمسات كلاسيكية راقية) */
    --accent-gold: #b45309;
    --accent-gold-gradient: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    --accent-gold-light: #fffbeb;
    --accent-blue: #2563eb;
    --accent-blue-light: #eff6ff;
    --accent-purple: #7c3aed;
    --accent-purple-light: #faf5ff;
    --accent-rose: #e11d48;
    --accent-rose-light: #fff1f2;

    /* Classic Typography Colors (خطوط كلاسيكية واضحة وعميقة) */
    --text-primary: #0f172a;        /* كحلي فحمي داكن وفخم */
    --text-secondary: #475569;      /* رمادي حجري متوازن */
    --text-muted: #64748b;          /* رمادي هادئ للمعلومات الثانوية */
    --text-emerald: #047857;

    /* Borders & Soft Shadows (حواف وظلال ناعمة جداً وكلاسيكية) */
    --border-light: #e2e8f0;
    --border-focus: #059669;
    --border-active: rgba(5, 150, 105, 0.4);

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-soft: 0 4px 18px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --shadow-float: 0 12px 28px -5px rgba(15, 23, 42, 0.1);
    --shadow-primary: 0 4px 14px rgba(5, 150, 105, 0.25);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

input, textarea, select {
    -webkit-user-select: text;
    user-select: text;
    min-width: 0;
}


button, a, input, select, textarea, .action-box, .nav-tab, .icon-btn, .filter-pill {
    touch-action: manipulation;
}

body {
    background-color: var(--bg-universe);
    color: var(--text-primary);
    direction: rtl;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* Ambient Subtle Background Lights (إضاءة هادئة غير مزعجة) */
.ambient-glow {
    position: fixed;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}
.glow-top-left {
    top: -120px;
    left: -120px;
    background: #a7f3d0;
}
.glow-bottom-right {
    bottom: -120px;
    right: -120px;
    background: #fde68a;
}

/* ====================================================================
   CLEAN APP UI SHELL (واجهة تطبيق راقية ونظيفة بدون حواف وهمية أو كاميرا)
   ==================================================================== */
.desktop-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 14px;
    overflow: hidden;
    box-sizing: border-box;
}

/* App Container (إطار برمجية نظيف وأنيق يبدأ مباشرة من الواجهة) */
.phone-chassis {
    width: 440px;
    max-width: 100%;
    height: 100%;
    max-height: 860px;
    background: var(--bg-phone);
    border-radius: 20px;
    box-shadow: 
        0 14px 38px -6px rgba(15, 23, 42, 0.12),
        0 0 0 1px rgba(203, 213, 225, 0.7);
    border: none;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: var(--transition);
}

/* Hide any notch or fake status bar */
.notch-container,
.phone-status-bar {
    display: none !important;
}

/* App Viewport Container */
.app-screen {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 76px;
    scroll-behavior: smooth;
    background: var(--bg-phone);
}
.app-screen::-webkit-scrollbar {
    width: 4px;
}
.app-screen::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* ====================================================================
   TOP APP BAR (شريط علوي فاتح زجاجي فخم)
   ==================================================================== */
.app-top-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-light);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand-identity {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-logo-badge {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-primary);
    color: #ffffff;
}
.brand-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}
.brand-subtitle {
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.icon-btn:hover {
    background: #e2e8f0;
    transform: scale(1.05);
}
.notification-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-rose);
    border: 2px solid #ffffff;
}

/* ====================================================================
   LUXURY WALLET CARD (بطاقة بنكية كلاسيكية فاتحة)
   ==================================================================== */
.balance-card-container {
    padding: 16px 18px 8px;
}
.luxury-wallet-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
    border-radius: var(--radius-lg);
    border: 1px solid #cbd5e1;
    padding: 18px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}
.wallet-card-pattern {
    position: absolute;
    top: -40px;
    left: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.wallet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.wallet-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.vault-tag {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid #a7f3d0;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.wallet-amount-row {
    margin-bottom: 16px;
}
.primary-balance {
    font-size: 30px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.primary-currency {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* Horizontal Multi-Currency Strip */
.currencies-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.currencies-strip::-webkit-scrollbar {
    display: none;
}
.curr-pill {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    min-width: 96px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.curr-pill:hover {
    border-color: #cbd5e1;
}
.curr-pill-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}
.curr-code-badge {
    direction: ltr;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-primary);
}
.curr-sym-badge {
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}
.curr-pill-val {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    direction: ltr;
    text-align: right;
}

/* ====================================================================
   FAST ACTION LAUNCHPAD (أزرار الوصول السريع بألوان باستيل كلاسيكية)
   ==================================================================== */
.launchpad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px 18px;
}
.action-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.action-box:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: #cbd5e1;
}
.action-box:active {
    transform: scale(0.96);
}
.action-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.action-box span {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

/* Pastel Calm Gradients */
.bg-emerald-grad {
    background: var(--primary-light);
    border: 1px solid #a7f3d0;
    color: #065f46;
}
.bg-gold-grad {
    background: var(--accent-gold-light);
    border: 1px solid #fde68a;
    color: #92400e;
}
.bg-blue-grad {
    background: var(--accent-blue-light);
    border: 1px solid #bfdbfe;
    color: #1e40af;
}
.bg-purple-grad {
    background: var(--accent-purple-light);
    border: 1px solid #e9d5ff;
    color: #6b21a8;
}

/* ====================================================================
   LIVE RATES TICKER MINI-BAR
   ==================================================================== */
.rates-ticker-section {
    padding: 6px 18px 14px;
}
.section-header-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.section-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.section-link {
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}
.rates-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
}
.rates-slider::-webkit-scrollbar {
    display: none;
}
.rate-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    min-width: 135px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.rate-chip:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}
.rate-chip-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}
.rate-trend-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: var(--radius-full);
}
.trend-up {
    background: var(--primary-light);
    color: #047857;
    border: 1px solid #a7f3d0;
}
.trend-down {
    background: var(--accent-rose-light);
    color: #be123c;
    border: 1px solid #fecdd3;
}
.rate-chip-price {
    font-size: 17px;
    font-weight: 900;
    color: var(--text-primary);
}
.rate-chip-detail {
    font-size: 10px;
    color: var(--text-muted);
}

/* ====================================================================
   LIST CARDS (بطاقات الحوالات والعمليات)
   ==================================================================== */
.content-section {
    padding: 8px 18px 20px;
}
.card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.transaction-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}
.transaction-card:hover {
    background: var(--bg-card-hover);
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}
.tx-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tx-icon-box {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.tx-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tx-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
}
.tx-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}
.tx-left {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}
.tx-amount {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}
.tx-amount.positive {
    color: var(--primary);
}

/* Status Pills (أوسمة الحالات الهادئة) */
.status-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.status-executed {
    background: var(--primary-light);
    color: #047857;
    border: 1px solid #a7f3d0;
}
.status-pending {
    background: var(--accent-gold-light);
    color: #b45309;
    border: 1px solid #fde68a;
}

/* ====================================================================
   BOTTOM NAVIGATION BAR (شريط تنقل سفلي فاتح وراقي)
   ==================================================================== */
.phone-bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 10px 2px;
    z-index: 90;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.04);
}
.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    padding: 6px 10px;
    position: relative;
}
.nav-tab .tab-icon {
    font-size: 19px;
    transition: var(--transition);
}
.nav-tab.active {
    color: var(--primary);
}
.nav-tab.active .tab-icon {
    transform: translateY(-2px) scale(1.12);
}
.nav-indicator {
    position: absolute;
    bottom: 2px;
    width: 16px;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius-full);
    display: none;
}
.nav-tab.active .nav-indicator {
    display: block;
}

/* Center Floating Action Button (FAB) */
.center-fab-wrapper {
    position: relative;
    top: -12px;
}
.center-fab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: 3px solid #ffffff;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-primary);
    cursor: pointer;
    transition: var(--transition);
}
.center-fab:hover {
    transform: scale(1.08);
}
.center-fab:active {
    transform: scale(0.94);
}

/* ====================================================================
   BOTTOM SHEETS & MODALS (قوائم منبثقة سفلية بلون أبيض نقي)
   ==================================================================== */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}
.bottom-sheet {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-bottom: none;
    border-radius: 28px 28px 0 0;
    width: 100%;
    max-height: 88%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.15);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
.modal-overlay.open .bottom-sheet {
    transform: translateY(0);
}

/* Drag Handle */
.sheet-drag-handle {
    width: 44px;
    height: 5px;
    background: #cbd5e1;
    border-radius: var(--radius-full);
    margin: 10px auto 4px;
    cursor: grab;
}
.sheet-header {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
}
.sheet-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.sheet-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-subtle);
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
}
.sheet-close-btn:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}
.sheet-body {
    padding: 18px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.sheet-body::-webkit-scrollbar {
    width: 4px;
}
.sheet-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* ====================================================================
   FORM CONTROLS (حقول إدخال أنيقة وفاتحة)
   ==================================================================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.form-input, .form-select, .form-textarea {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: var(--transition);
    width: 100%;
    min-height: 44px;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-select {
    cursor: pointer;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

/* Segmented Control Switcher */
.segmented-control {
    display: flex;
    background: #f1f5f9;
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-light);
    gap: 4px;
}
.segment-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.segment-btn.active {
    background: #ffffff;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* Calculation Highlight Box (صندوق العمليات الحسابية الهادئ) */
.calc-highlight-box {
    background: #f0fdf4;
    border: 1px dashed #86efac;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.calc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}
.calc-val {
    font-weight: 700;
    color: var(--text-primary);
}
.calc-val.highlight {
    color: var(--primary-hover);
    font-size: 15px;
    font-weight: 900;
}

/* Action Buttons */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-primary);
    transition: var(--transition);
    width: 100%;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
}
.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: #f1f5f9;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}
.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-whatsapp {
    background: #25D366;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
    transition: var(--transition);
}
.btn-whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-1px);
}

/* ====================================================================
   PAGE VIEWS & TABS
   ==================================================================== */
.app-view {
    display: none;
    animation: fadeInView 0.22s ease-out;
}
.app-view.active {
    display: block;
}
@keyframes fadeInView {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Filter Pill Badges */
.filter-tabs {
    display: flex;
    gap: 8px;
    padding: 8px 18px 14px;
    overflow-x: auto;
}
.filter-tabs::-webkit-scrollbar {
    display: none;
}
.filter-pill {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.filter-pill:hover {
    border-color: #cbd5e1;
}
.filter-pill.active {
    background: var(--primary-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: var(--shadow-primary);
}

/* Search Box */
.search-container {
    padding: 6px 18px 12px;
}
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 11px 42px 11px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    min-height: 44px;
}
.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.search-icon {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
    font-size: 16px;
}

/* Rates Grid */
.rates-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 18px 20px;
}
.rate-card-rich {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.rate-card-rich:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-soft);
}
.rate-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.currency-flag-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}
.rate-metrics-trio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px;
    text-align: center;
    gap: 4px;
}
.metric-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.metric-title {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
}
.metric-val {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}
.metric-val.buy { color: #047857; }
.metric-val.sell { color: #e11d48; }
.metric-val.remit { color: #b45309; }

/* Grid of Vaults & Suppliers */
.balances-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 18px 20px;
}
.entity-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}
.entity-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.entity-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.balance-sub-chip {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-primary);
}
.balance-sub-chip.negative {
    color: #e11d48;
    background: var(--accent-rose-light);
    border-color: #fecdd3;
}

/* Reports Financial Overview */
.report-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 8px 18px 16px;
}
.report-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: var(--shadow-sm);
}
.stat-icon {
    font-size: 20px;
    margin-bottom: 2px;
}
.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 700;
}
.stat-number {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

/* More Menu List */
.menu-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 18px 20px;
}
.menu-item-row {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.menu-item-row:hover {
    background: var(--bg-card-hover);
    border-color: #cbd5e1;
    transform: translateY(-1px);
}
.menu-item-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.menu-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

/* ====================================================================
   RECEIPT PRINT & PREVIEW (ورق الإيصال الكلاسيكي النقي)
   ==================================================================== */
.receipt-paper {
    background: #ffffff;
    color: #111827;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    padding: 24px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
    font-size: 12px;
    line-height: 1.5;
    position: relative;
    -webkit-user-select: text;
    user-select: text;
}
.receipt-header-print {
    text-align: center;
    border-bottom: 2px dashed #cbd5e1;
    padding-bottom: 14px;
    margin-bottom: 14px;
}
.print-logo-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 4px;
}
.print-title {
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
}
.print-subtitle {
    font-size: 11px;
    color: #475569;
}
.print-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.print-meta-item {
    font-size: 11px;
    color: #334155;
}
.print-meta-item strong {
    color: #0f172a;
}
.print-party-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.print-amount-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    margin-bottom: 14px;
}
.print-amount-big {
    font-size: 22px;
    font-weight: 900;
    color: #166534;
}
.print-qr-footer {
    text-align: center;
    border-top: 2px dashed #cbd5e1;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.print-qr-code {
    width: 90px;
    height: 90px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.print-qr-code canvas,
.print-qr-code img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    image-rendering: pixelated;
}
.print-footer-text {
    font-size: 10px;
    color: #64748b;
    text-align: center;
}

/* ====================================================================
   MEDIA PRINT RULES
   ==================================================================== */
@media print {
    body {
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .desktop-wrapper, .simulator-controls, .phone-status-bar, .notch-container, .phone-bottom-nav, .app-top-header, .ambient-glow {
        display: none !important;
    }
    .modal-overlay {
        position: static !important;
        background: none !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .bottom-sheet {
        box-shadow: none !important;
        border: none !important;
        transform: none !important;
        max-height: none !important;
    }
    .sheet-drag-handle, .sheet-header, .receipt-modal-actions {
        display: none !important;
    }
    .receipt-paper {
        box-shadow: none !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
    }
}

/* ====================================================================
   RESPONSIVE DESIGN FOR ACTUAL PHONES (Full Screen Native Mobile Mode)
   ==================================================================== */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    body {
        padding: 0 !important;
        margin: 0 !important;
        background: var(--bg-phone) !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
        align-items: stretch !important;
    }
    .desktop-wrapper {
        padding: 0 !important;
        margin: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
    }
    .phone-chassis {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
    .ambient-glow {
        display: none !important;
    }
    .app-screen {
        padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .phone-bottom-nav {
        height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
        padding-bottom: max(6px, env(safe-area-inset-bottom)) !important;
    }
    .nav-tab {
        font-size: 12px !important;
        font-weight: 700 !important;
        flex: 1;
        min-width: 0;
        min-height: 48px;
        padding: 6px 2px;
    }

    /* Prevent automatic zoom in iOS Safari and Android Chrome */
    input, select, textarea,
    .form-input, .form-select, .form-textarea,
    .auth-input, .search-input, .branch-selector {
        font-size: 16px !important; /* Strict 16px to prevent mobile browser zoom-in */
        min-height: 48px !important;
        border-radius: 12px !important;
    }
    .form-label, .auth-field-label {
        font-size: 15px !important;
        font-weight: 700 !important;
        margin-bottom: 5px !important;
    }
    .btn-primary, .btn-secondary, .auth-submit-btn {
        min-height: 48px !important;
        font-size: 15px !important;
        font-weight: 800 !important;
        border-radius: 12px !important;
    }

    /* Modals & Full Bottom Sheets for Mobile */
    .modal-overlay {
        position: fixed !important;
        inset: 0 !important;
        z-index: 2000 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: rgba(15, 23, 42, 0.55) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        backdrop-filter: blur(8px) !important;
    }
    .bottom-sheet {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        border: none;
    }
    .sheet-drag-handle {
        display: none;
    }
    .sheet-header {
        padding: 14px 18px !important;
        padding-top: max(14px, env(safe-area-inset-top, 0px)) !important;
        flex-shrink: 0;
    }
    .sheet-title {
        font-size: 17px !important;
        font-weight: 800 !important;
    }
    .sheet-body {
        padding: 16px 18px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
        gap: 14px !important;
        flex: 1;
        min-height: 0;
        overscroll-behavior-y: contain;
        scroll-padding-block: 20px;
    }

    /* Authentication Gate on Mobile */
    .auth-gate {
        padding: 0 !important;
        background: var(--bg-phone);
    }
    .auth-card {
        width: 100% !important;
        max-width: none !important;
        height: 100% !important;
        max-height: 100% !important;
        padding: max(32px, env(safe-area-inset-top, 0px)) 24px max(24px, env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 0 !important;
        border: none;
        box-shadow: none;
    }
    .auth-main-title {
        font-size: 18px !important;
    }
    .auth-subtitle {
        font-size: 14px !important;
    }
    .auth-message {
        font-size: 14px;
    }

    /* Native App Spacing on Small Screens */
    .app-top-header {
        padding: 10px 14px !important;
        padding-top: max(10px, env(safe-area-inset-top, 0px)) !important;
        gap: 8px;
        flex-wrap: wrap;
    }
    .brand-identity, .brand-identity > div, .tx-right, .tx-info {
        min-width: 0;
    }
    .brand-title {
        font-size: 17px;
    }
    .brand-subtitle {
        font-size: 12px;
    }
    .brand-logo-badge {
        flex-shrink: 0;
    }
    .header-actions {
        gap: 4px;
        flex-shrink: 0;
        margin-inline-start: auto;
        max-width: 100%;
    }
    .icon-btn, .sheet-close-btn {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }
    .section-title, .tx-title, .tx-amount {
        font-size: 16px;
    }
    .section-link, .tx-subtitle, .rate-chip-top {
        font-size: 14px;
    }
    .tx-subtitle {
        flex-wrap: wrap;
    }
    .tx-title {
        overflow-wrap: anywhere;
    }
    .rate-chip-detail, .status-pill {
        font-size: 12px;
    }
    .balance-card-container {
        padding: 14px 14px 6px !important;
    }
    .luxury-wallet-card {
        padding: 16px !important;
        border-radius: 20px !important;
    }
    .primary-balance {
        font-size: 30px !important;
    }
    .launchpad-grid {
        padding: 8px 14px !important;
        gap: 8px !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .action-box {
        padding: 16px 10px !important;
        border-radius: 14px !important;
    }
    .action-box span {
        font-size: 15px !important;
        font-weight: 700 !important;
    }
    .rates-ticker-section, .content-section, .search-container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
    .filter-tabs {
        padding: 6px 14px 12px !important;
        gap: 6px !important;
    }
    .filter-pill {
        font-size: 14px !important;
        min-height: 44px;
        padding: 7px 14px !important;
        white-space: nowrap !important;
    }
    .form-row {
        gap: 8px !important;
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Keep touch-device fields readable even in landscape above 768px. */
@media (any-pointer: coarse) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: minmax(0, 1fr);
    }
    .form-group, .sheet-body, .auth-input-wrapper {
        min-width: 0;
    }
    .sheet-body {
        min-height: 0;
        scroll-padding-block: 16px;
    }
}

/* Authentication and branch context */
/* ====================================================================
   CLASSIC LIGHT AUTHENTICATION PORTAL (تسجيل دخول مصرفي كلاسيكي وفاتح)
   ==================================================================== */
.auth-gate {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(241, 245, 249, 0.90);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.auth-gate.open {
    display: flex;
}

/* Classic White Card with Delicate Border & Soft Classic Shadow */
.auth-card {
    width: min(100%, 390px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 34px 28px 24px;
    border-radius: 20px;
    background: #ffffff;
    color: var(--text-primary);
    box-shadow: 
        0 14px 38px -6px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(226, 232, 240, 0.9);
    border: 1px solid #e2e8f0;
    text-align: center;
    position: relative;
}

.auth-brand-emblem {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.22);
}

.auth-main-title {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px;
    letter-spacing: -0.2px;
}
.auth-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 14px;
}

.auth-message {
    min-height: 22px;
    margin-bottom: 14px;
    padding: 5px 12px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 700;
    border: 1px solid #a7f3d0;
}
.auth-message.error {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

/* Form Fields */
.auth-field-group {
    text-align: right;
    margin-bottom: 12px;
}
.auth-field-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input-icon {
    position: absolute;
    right: 14px;
    font-size: 16px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}
.auth-input {
    width: 100%;
    height: 48px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 42px 0 14px;
    outline: none;
    transition: var(--transition);
}
.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}
.auth-pwd-toggle {
    position: absolute;
    left: 12px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    transition: var(--transition);
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    height: 46px;
    margin-top: 6px;
    border: none;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-primary);
    transition: var(--transition);
}
.auth-submit-btn:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.32);
}

.auth-hint-text {
    margin-top: 14px;
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--bg-subtle);
    border: 1px dashed var(--border-light);
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
}

.branch-selector {
    max-width: 135px;
    min-height: 36px;
    padding: 5px 8px;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 10px;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #0f172a);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
}

.permission-group {
    padding: 12px;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 12px;
}

.permission-group-title {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--primary, #059669);
}

.permission-option,
.branch-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 12px;
}

/* ====================================================================
   VAULTS SUITE: 4-TAB CONTROL, CURRENCIES BREAKDOWN & MOVEMENTS LEDGER
   ==================================================================== */

.vault-segmented-control {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
}

.vault-segmented-control .segment-btn {
    font-size: 11px;
    padding: 7px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 7px;
}

/* Currency Breakdown Subview Cards */
.currency-breakdown-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.currency-breakdown-card:hover {
    box-shadow: var(--shadow-soft);
    border-color: var(--border-active);
}

.currency-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.currency-badge-combo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-flag-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 1px solid var(--border-light);
}

.currency-code-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}

.currency-name-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.currency-total-pill {
    text-align: left;
}

.currency-total-num {
    font-size: 17px;
    font-weight: 900;
    color: var(--primary);
    direction: ltr;
    display: inline-block;
}

.vault-distribution-list {
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.vault-distribution-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.vault-dist-name {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.vault-dist-amount {
    font-weight: 700;
    color: var(--text-primary);
    direction: ltr;
}

/* Vault Movements & Ledger Filter Card */
.ledger-filter-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.ledger-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.btn-text-sm {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}
.btn-text-sm:hover {
    background: var(--primary-light);
}

.filter-grid-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.filter-field-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-field-col label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

.input-compact, .select-compact {
    padding: 7px 10px !important;
    font-size: 12px !important;
    min-height: 36px !important;
    border-radius: 8px !important;
}

.filter-presets-row {
    display: flex;
    gap: 6px;
    margin: 8px 0 10px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.filter-preset-btn {
    flex: 1;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-align: center;
}

.filter-preset-btn.active, .filter-preset-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.filter-actions-row {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

/* Ledger Summary Ribbon */
.ledger-summary-ribbon {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.summary-stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 8px 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.summary-stat-box.stat-in {
    border-top: 3px solid #10b981;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.summary-stat-box.stat-out {
    border-top: 3px solid #ef4444;
    background: linear-gradient(180deg, #fef2f2 0%, #ffffff 100%);
}

.summary-stat-box.stat-net {
    border-top: 3px solid #0284c7;
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}

.summary-stat-box.stat-count {
    border-top: 3px solid #8b5cf6;
    background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
}

.stat-box-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 3px;
}

.stat-box-val {
    font-size: 12.5px;
    font-weight: 900;
    direction: ltr;
    display: inline-block;
}

.stat-in .stat-box-val { color: #047857; }
.stat-out .stat-box-val { color: #b91c1c; }
.stat-net .stat-box-val { color: #0369a1; }
.stat-count .stat-box-val { color: #6d28d9; }

/* Ledger Entries Cards / List */
.ledger-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ledger-entry-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--transition);
}

.ledger-entry-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-soft);
}

.ledger-card-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ledger-seq-badge {
    font-family: monospace;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    background: var(--bg-subtle);
    padding: 2px 6px;
    border-radius: 5px;
    border: 1px solid var(--border-light);
}

.ledger-time {
    font-size: 11px;
    color: var(--text-muted);
}

.ledger-card-row-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ledger-op-desc {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ledger-op-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
}
.op-remittance { background: #e0f2fe; color: #0369a1; }
.op-fx { background: #fef3c7; color: #92400e; }
.op-expense { background: #fee2e2; color: #991b1b; }
.op-adjustment { background: #dcfce7; color: #166534; }

.ledger-vault-tag {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
}

.ledger-amount-box {
    text-align: left;
}

.ledger-amount-val {
    font-size: 14.5px;
    font-weight: 900;
    direction: ltr;
    display: inline-block;
}
.dir-in { color: #059669; }
.dir-out { color: #dc2626; }

.ledger-card-row-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px dashed var(--border-light);
    font-size: 11px;
    color: var(--text-muted);
}

.ledger-balance-track {
    display: flex;
    gap: 8px;
    font-size: 10.5px;
}

.ledger-notes-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 170px;
}

/* ====================================================================
   FINANCIAL REPORTS MODAL & EXECUTIVE DASHBOARD
   ==================================================================== */

.modal-wide-sheet {
    max-width: 580px !important;
}

.report-filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.report-date-inputs {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.report-actions-row {
    display: flex;
    gap: 8px;
}

.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.report-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.report-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
}
.kpi-profit::before { background: linear-gradient(90deg, #10b981, #059669); }
.kpi-commission::before { background: linear-gradient(90deg, #0284c7, #2563eb); }
.kpi-fx::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.kpi-expenses::before { background: linear-gradient(90deg, #ef4444, #dc2626); }

.report-kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.report-kpi-title {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
}

.report-kpi-icon {
    font-size: 18px;
}

.report-kpi-number {
    font-size: 17px;
    font-weight: 900;
    color: var(--text-primary);
    direction: ltr;
}

.kpi-profit .report-kpi-number { color: #047857; }
.kpi-expenses .report-kpi-number { color: #b91c1c; }

.report-kpi-subtext {
    font-size: 10.5px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Report Section Navigation Tabs */
.report-nav-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}
.report-nav-tabs::-webkit-scrollbar { display: none; }

.rep-nav-tab {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 7px 11px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.rep-nav-tab.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
}

/* Financial Tables & Details */
.report-table-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 12px;
}

.report-table-title {
    background: var(--bg-subtle);
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rep-fin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
    text-align: right;
}

.rep-fin-table th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 700;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-light);
}

.rep-fin-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
}

.rep-fin-table tr:last-child td {
    border-bottom: none;
}

.rep-fin-table td.num {
    direction: ltr;
    text-align: left;
    font-weight: 700;
}

.rep-fin-table tr.total-row td {
    background: #f8fafc;
    font-weight: 900;
    border-top: 1px solid var(--border-light);
}

/* ====================================================================
   OFFICIAL PRINTABLE STATEMENT & FINANCIAL REPORT (A4 PAPER)
   ==================================================================== */
.print-statement-paper {
    display: none;
    background: #ffffff;
    color: #0f172a;
    padding: 24px 28px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.6;
}

.stmt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #059669;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.stmt-brand h2 {
    font-size: 18px;
    font-weight: 900;
    color: #059669;
    margin: 0;
}

.stmt-brand p {
    font-size: 11px;
    color: #64748b;
    margin: 2px 0 0;
}

.stmt-meta-box {
    text-align: left;
    font-size: 11px;
    color: #475569;
}

.stmt-meta-box strong {
    color: #0f172a;
}

.stmt-info-strip {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 11.5px;
}

.stmt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 11px;
}

.stmt-table th {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 6px 8px;
    font-weight: 800;
    text-align: right;
}

.stmt-table td {
    border: 1px solid #e2e8f0;
    padding: 6px 8px;
}

.stmt-table td.num {
    direction: ltr;
    text-align: left;
    font-weight: 700;
}

.stmt-table tr:nth-child(even) {
    background: #fafafa;
}

.stmt-summary-totals {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.stmt-totals-box {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    min-width: 250px;
    font-size: 11.5px;
}

.stmt-total-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.stmt-total-line.final {
    background: #ecfdf5;
    font-weight: 900;
    color: #047857;
    border-bottom: none;
}

.stmt-signatures {
    margin-top: 32px;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    page-break-inside: avoid;
}

.stmt-sign-col {
    text-align: center;
    width: 180px;
}

.stmt-sign-line {
    border-bottom: 1px dashed #94a3b8;
    height: 35px;
    margin-bottom: 6px;
}

@media print {
    body.printing-statement .desktop-wrapper,
    body.printing-statement .simulator-controls,
    body.printing-statement .modal-overlay,
    body.printing-statement #app-screen {
        display: none !important;
    }
    body.printing-statement #vault-statement-print-area {
        display: block !important;
        position: static !important;
        width: 100% !important;
    }

    body.printing-report .desktop-wrapper,
    body.printing-report .simulator-controls,
    body.printing-report .modal-overlay,
    body.printing-report #app-screen {
        display: none !important;
    }
    body.printing-report #financial-report-print-area {
        display: block !important;
        position: static !important;
        width: 100% !important;
    }
}

/* ====================================================================
   EXTRACTED UTILITY & COMPONENT CLASSES (NO INLINE STYLES)
   ==================================================================== */
.auth-recovery-wrapper {
    margin-top: 14px;
    text-align: center;
}

.auth-recovery-btn {
    background: none;
    border: none;
    color: #0284c7;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.recovery-notice-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 12px;
    color: #475569;
    line-height: 1.6;
}

.recovery-action-row {
    margin-bottom: 12px;
}

.btn-check-admin {
    width: 100%;
    padding: 9px 12px;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#recovery-account-box {
    display: none;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #065f46;
    line-height: 1.6;
}

.auth-submit-btn-mt {
    margin-top: 6px;
}

.auth-cancel-wrapper {
    margin-top: 10px;
    text-align: center;
}

.auth-cancel-link {
    background: none;
    border: none;
    color: #64748b;
    font-size: 12.5px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
}

.text-emerald {
    color: #10b981;
}

.rates-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.rates-view-title {
    font-size: 16px;
    font-weight: 800;
}

.rates-view-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.rates-action-buttons {
    display: flex;
    gap: 8px;
}

.btn-rates-add {
    width: auto;
    padding: 8px 12px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-rates-edit {
    width: auto;
    padding: 8px 14px;
    font-size: 12px;
}

.calc-section-title {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-emerald);
}

.mt-12 {
    margin-top: 12px;
}

.vault-tabs-wrapper {
    padding: 10px 18px 6px;
}

.vault-actions-bar {
    display: flex;
    gap: 8px;
    padding: 0 18px 10px;
    flex-wrap: wrap;
}

.btn-vault-action {
    flex: 1;
    min-width: 120px;
    padding: 8px 10px;
    font-size: 12px;
}

.btn-supplier-action {
    flex: 1;
    min-width: 110px;
    padding: 8px 10px;
    font-size: 12px;
    background: var(--accent-gold-gradient);
}

.btn-deposit-action {
    padding: 8px 12px;
    font-size: 12px;
}

#subview-currencies,
#subview-suppliers {
    display: none;
}

#subview-movements {
    display: none;
    padding: 0 18px 24px;
}

.ledger-filter-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 13px;
    color: var(--text-primary);
}

.flex-1 {
    flex: 1;
}

.btn-filter-apply {
    flex: 1;
    padding: 8px 12px;
    font-size: 12.5px;
}

.btn-filter-print {
    padding: 8px 12px;
    font-size: 12.5px;
}

.menu-item-icon {
    font-size: 18px;
}

.menu-item-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.label-rate-buy {
    color: #34d399;
}

.label-rate-sell {
    color: #f43f5e;
}

.label-rate-remit {
    color: #fbbf24;
}

.input-currency-code {
    text-transform: uppercase;
    font-weight: 700;
}

.sheet-receipt {
    max-height: 94%;
}

.receipt-print-badge {
    margin-top: 6px;
    font-weight: 800;
    font-size: 13px;
    color: #10b981;
}

.status-success-green {
    color: #166534;
}

.receipt-net-label {
    font-size: 11px;
    color: #4b5563;
}

.receipt-fee-label {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
}

.receipt-ref-label {
    font-size: 11px;
    font-weight: 700;
}

.receipt-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.wa-textarea {
    font-size: 12px;
    line-height: 1.6;
}

.btn-whatsapp-full {
    width: 100%;
    padding: 14px;
}

.sheet-settings {
    max-height: 90%;
}

.hostinger-callout {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.hostinger-callout-title {
    font-weight: 700;
    color: #60a5fa;
}

.hostinger-callout-text {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.code-emerald {
    color: #34d399;
}

.settings-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.btn-reset-data {
    color: #f43f5e;
}

.report-header-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-header-icon {
    font-size: 22px;
}

.report-header-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

.report-sheet-body {
    padding: 14px 18px 24px;
    max-height: 80vh;
    overflow-y: auto;
}

.btn-report-refresh {
    flex: 1;
    padding: 8px 12px;
    font-size: 12.5px;
}

.btn-report-print {
    padding: 8px 12px;
    font-size: 12.5px;
}

.rep-panel {
    display: none;
}

.rep-panel.active {
    display: block;
}


/* Supplier statement: readable independent currency accounts and A4 output. */
.supplier-statement-trigger { width:100%; margin-top:12px; padding:11px; border:1px solid #a7f3d0; border-radius:10px; background:#ecfdf5; color:#047857; font-family:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.statement-sheet { max-width:1000px !important; width:100%; }
.statement-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.statement-filters label { display:flex; flex-direction:column; gap:6px; font-size:12px; font-weight:700; }
.statement-filters input,.statement-filters select { width:100%; min-height:44px; border:1px solid #d1d5db; border-radius:9px; background:white; padding:8px; color:#1e293b; }
.statement-filters button { align-self:end; min-height:44px; }
.statement-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:18px; font-size:11px; color:#64748b; }
.statement-toolbar button { min-height:44px; width:auto; padding:10px 18px; }
.statement-toolbar button:disabled { opacity:.45; cursor:not-allowed; }
