@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #f1f5f9;         /* Soft light slate background */
    --bg-card: #ffffff;         /* Pure crisp white card background */
    --bg-header: #0f172a;       /* Deep navy blue header navbar */
    --border-color: #cbd5e1;    /* Clean slate border */
    --border-light: #e2e8f0;
    --text-main: #0f172a;       /* Dark slate text for ultra-high contrast */
    --text-muted: #475569;      /* Clear slate muted text */
    --text-dark-label: #1e293b; /* Crisp dark labels */
    
    --primary: #2563eb;         /* Royal blue primary */
    --primary-hover: #1d4ed8;
    --emerald: #059669;         /* Fintech investment green */
    --emerald-light: #ecfdf5;
    --amber: #d97706;           /* Investment warning / ROI gold */
    --amber-light: #fffbeb;
    --rose: #e11d48;            /* Loss / Risk red */
    --rose-light: #fff1f2;
}

body {
    font-family: 'Cairo', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

/* Header Navbar */
.navbar-custom {
    background-color: var(--bg-header);
    border-bottom: 2px solid #1e293b;
    padding: 0.9rem 1.75rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.navbar-brand-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.user-badge {
    background-color: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 0.4rem 1rem;
    border-radius: 50rem;
    font-size: 0.875rem;
    font-weight: 700;
}

/* Main Container Layout */
.main-wrapper {
    padding: 2rem 1.5rem;
    max-width: 1440px;
    margin: 0 auto;
}

/* Modern Financial KPI Cards */
.kpi-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 1.35rem 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}
.kpi-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.kpi-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}
.kpi-subtext {
    font-size: 0.825rem;
    color: #64748b;
    margin-top: 0.35rem;
    font-weight: 500;
}

/* High Contrast Crisp Data Tables */
.table-custom-wrapper {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}
.table-custom {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-main);
    border-collapse: separate;
    border-spacing: 0;
}
.table-custom th {
    background-color: #f8fafc;
    color: #334155;
    font-weight: 800;
    font-size: 0.875rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 2px solid var(--border-light);
}
.table-custom td {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 0.95rem;
    color: #1e293b;
}
.table-custom tr:last-child td {
    border-bottom: none;
}
.table-custom tr:hover td {
    background-color: #f8fafc;
}

/* High-Contrast Financial Highlights */
.num-positive {
    color: var(--emerald);
    font-weight: 800;
}
.num-negative {
    color: var(--rose);
    font-weight: 800;
}
.num-neutral {
    color: var(--primary);
    font-weight: 800;
}

/* Tabs Navigation */
.nav-tabs-custom {
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 1.75rem;
    gap: 0.5rem;
}
.nav-tabs-custom .nav-link {
    color: var(--text-muted);
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.85rem 1.35rem;
    font-weight: 700;
    background: transparent;
    border-radius: 0;
    font-size: 0.95rem;
}
.nav-tabs-custom .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}
.nav-tabs-custom .nav-link:hover {
    color: var(--text-main);
}

/* Modals & Crisp Input Forms (100% Contrast Fix) */
.modal-content-custom {
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-main);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.modal-header-custom {
    border-bottom: 1px solid var(--border-light);
    padding: 1.25rem 1.5rem;
    background-color: #f8fafc;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}
.modal-header-custom .modal-title {
    color: #0f172a;
}
.form-label-custom {
    color: #1e293b;
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.4rem;
    display: block;
}
.form-control-custom, .form-select-custom {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 10px !important;
    padding: 0.7rem 1rem !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}
.form-control-custom::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}
.form-control-custom:focus, .form-select-custom:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.btn-primary-custom {
    background-color: var(--primary);
    border: none;
    color: #ffffff;
    font-weight: 700;
    padding: 0.7rem 1.35rem;
    border-radius: 10px;
    transition: background-color 0.2s;
}
.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
}

/* Badges for Transfer Methods & Risk */
.badge-instapay {
    background-color: #e0e7ff;
    color: #3730a3;
    font-weight: 700;
    border: 1px solid #c7d2fe;
}
.badge-vfcash {
    background-color: #ffe4e6;
    color: #9f1239;
    font-weight: 700;
    border: 1px solid #fecdd3;
}
.badge-bank {
    background-color: #dcfce7;
    color: #166534;
    font-weight: 700;
    border: 1px solid #bbf7d0;
}
.badge-risk-low {
    background-color: #dcfce7;
    color: #15803d;
    font-weight: 700;
}
.badge-risk-medium {
    background-color: #fef3c7;
    color: #b45309;
    font-weight: 700;
}
.badge-risk-high {
    background-color: #fee2e2;
    color: #b91c1c;
    font-weight: 700;
}
