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

:root {
    --brand: #1a73e8;
    --brand-dark: #0e1a2d;
    --ink: #0f172a;
    --muted: #64748b;
    --card-shadow: 0 1px 3px rgba(15,23,42,.06), 0 8px 24px -12px rgba(15,23,42,.18);
}

* { box-sizing: border-box; }

body {
    font-family: 'Tajawal', 'Cairo', system-ui, sans-serif;
    background: #f1f5f9;
    color: var(--ink);
    margin: 0;
}

/* شعار مائي خافت في خلفية كافة الصفحات */
body::before {
    content: '';
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: url('../images/logo.jpg') center / min(78vh, 78vw) no-repeat;
    opacity: .18;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: -1;
}

.wrapper { min-height: 100vh; }

.content-wrapper { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 1030;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 20px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.page-title-mobile { font-weight: 700; }

.main-container { padding: 20px; flex: 1; }

.sidebar-toggle {
    background: transparent; border: 0; font-size: 20px; color: var(--ink);
    padding: 4px 10px; margin-inline-end: 6px;
}

.card {
    border: 0; border-radius: 14px;
    box-shadow: var(--card-shadow);
    background: #fff;
}
.card-header {
    background: #fff; border-bottom: 1px solid #eef2f7;
    font-weight: 700; border-radius: 14px 14px 0 0 !important;
}

.stat-card { border-radius: 16px; padding: 20px; color: #fff; position: relative; overflow: hidden; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; }
.stat-card .stat-label { font-size: 13px; opacity: .85; }
.stat-card i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 48px; opacity: .18; }
.bg-grad-1 { background: linear-gradient(135deg,#2563eb,#38bdf8); }
.bg-grad-2 { background: linear-gradient(135deg,#059669,#34d399); }
.bg-grad-3 { background: linear-gradient(135deg,#d97706,#fbbf24); }
.bg-grad-4 { background: linear-gradient(135deg,#dc2626,#f87171); }

.dash-hero {
    display: flex; align-items: center; gap: 16px;
    background: #fff; border-radius: 16px; padding: 16px 22px;
    box-shadow: var(--card-shadow); margin-bottom: 20px;
}
.dash-hero .dash-logo {
    height: 78px; width: 78px; object-fit: contain; flex-shrink: 0;
    background: #fff; padding: 6px; border-radius: 50%;
    border: 2px solid #e2e8f0;
    box-shadow: 0 6px 16px -6px rgba(15,23,42,.3);
}
.dash-hero .dash-title { font-size: 22px; font-weight: 800; color: var(--ink); margin: 0; line-height: 1.25; }
.dash-hero .dash-org { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }

.table > :not(caption) > * > * { padding: .6rem .75rem; }
.table thead th { background: #f8fafc; font-size: 13px; color: var(--muted); white-space: nowrap; }
.table tbody td { font-size: 14px; vertical-align: middle; }

.amount-debit { color: #0f766e; font-variant-numeric: tabular-nums; }
.amount-credit { color: #b91c1c; font-variant-numeric: tabular-nums; }
.amount-default { font-variant-numeric: tabular-nums; font-weight: 600; }

.login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(1200px 600px at 80% -10%, rgba(56,189,248,.25), transparent),
                linear-gradient(160deg,#0a1120,#0e1a2d);
}
.login-card {
    width: 100%; max-width: 400px; background: #fff; border-radius: 20px;
    padding: 34px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
}
.login-card .brand-icon {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 12px;
    background: linear-gradient(135deg,#2563eb,#38bdf8); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 26px;
}

/* mobile card tables */
@media (max-width: 767.98px) {
    .table.mobile-cards thead { display: none; }
    .table.mobile-cards tbody tr {
        display: block; margin-bottom: 10px; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden;
    }
    .table.mobile-cards tbody td {
        display: flex; justify-content: space-between; border: 0; border-bottom: 1px solid #f1f5f9;
    }
    .table.mobile-cards tbody td::before {
        content: attr(data-label); font-weight: 700; color: var(--muted); margin-inline-end: 12px;
    }
}
