* {
    box-sizing: border-box;
}

:root {
    --brand-dark: #050510;
    --brand-navy: #11154a;
    --brand-blue: #232a8b;
    --brand-blue-light: #3842c4;
    --brand-silver: #b8b5c6;
    --brand-text: #111827;
    --brand-bg: #f4f6fb;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(180deg, #f6f7ff 0%, #eef1fb 100%);
    color: var(--brand-text);
}

/* =========================
   HEADER - CLEAN SAAD THEME
========================= */

.topbar {
    background: #f4f6ff;
    color: #050510;
    padding: 5px 14px;
    border-bottom: 3px solid #232a8b;
    box-shadow: 0 4px 14px rgba(17, 21, 74, 0.12);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: auto;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #050510;
}

.logo-box {
    width: 56px;
    height: 56px;
    background: #ffffff;
    border: 2px solid #232a8b;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    box-shadow: 0 3px 10px rgba(35, 42, 139, 0.20);
    overflow: hidden;
}

.logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-text span {
    display: block;
    color: #050510;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 1.2px;
    line-height: 1;
}

.brand-text small {
    display: block;
    color: #232a8b;
    font-size: 10px;
    font-weight: 700;
    margin-top: 3px;
    letter-spacing: 0.8px;
}

nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

nav a {
    color: #11154a;
    background: transparent;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s ease;
}

nav a.active,
nav a:hover {
    background: #232a8b;
    color: #ffffff;
}

.menu-btn {
    display: none;
    background: #232a8b;
    color: #ffffff;
    border: 0;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 19px;
    cursor: pointer;
}

/* =========================
   MAIN LAYOUT
========================= */

.container {
    max-width: 1200px;
    margin: auto;
    padding: 25px;
}

.footer {
    text-align: center;
    padding: 20px;
    color: #777;
}

/* =========================
   CARDS & GRID
========================= */

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.card {
    background: white;
    padding: 22px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(17, 21, 74, 0.10);
    margin-bottom: 20px;
    border: 1px solid rgba(35,42,139,0.08);
}

.card h2 {
    margin-top: 0;
    color: var(--brand-navy);
}

.stat-card {
    background: linear-gradient(180deg, #ffffff 0%, #f7f8ff 100%);
    padding: 22px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(17, 21, 74, 0.10);
    border: 1px solid rgba(35,42,139,0.10);
}

.stat-card h3 {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: bold;
    margin-top: 10px;
}

.in {
    color: var(--success);
}

.out {
    color: var(--danger);
}

.balance {
    color: var(--brand-blue);
}

/* =========================
   BUTTONS
========================= */

.btn {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light));
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #991b1b, #ef4444);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #b45309, #f59e0b);
    color: white;
}

.btn-light {
    background: #e8eaff;
    color: var(--brand-navy);
}

/* =========================
   TABLE
========================= */

.table-wrap {
    overflow-x: auto;
    border-radius: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-navy));
    color: white;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
}

tr:hover {
    background: #f7f8ff;
}

tfoot th {
    background: linear-gradient(135deg, #11154a, #232a8b);
}

/* =========================
   FORMS
========================= */

form label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: var(--brand-navy);
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 15px;
    background: white;
}

form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(35, 42, 139, 0.12);
}

.actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-box {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    align-items: end;
}

/* =========================
   ALERT
========================= */

.alert {
    padding: 12px 15px;
    border-radius: 12px;
    background: #e8eaff;
    color: var(--brand-navy);
    margin-bottom: 15px;
    border-left: 5px solid var(--brand-blue);
}

/* =========================
   PRINT
========================= */

.print-only {
    display: none;
}

@media print {
    .topbar,
    .footer,
    .no-print,
    .actions {
        display: none !important;
    }

    body {
        background: white;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border-radius: 0;
        border: none;
    }

    .print-only {
        display: block;
    }

    table {
        font-size: 12px;
    }

    th,
    td {
        padding: 7px;
    }
}

/* =========================
   MOBILE RESPONSIVE
========================= */

@media(max-width: 768px) {
    .topbar {
        padding: 5px 10px;
    }

    .header-inner {
        min-height: 46px;
        flex-wrap: wrap;
    }

    .logo-box {
        width: 38px;
        height: 38px;
    }

    .brand-text span {
        font-size: 14px;
    }

    .brand-text small {
        font-size: 9px;
    }

    .menu-btn {
        display: block;
        margin-left: auto;
    }

    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        background: #ffffff;
        padding: 8px;
        border: 1px solid #d8dcff;
        border-radius: 12px;
        margin-top: 6px;
    }

    nav.show {
        display: flex;
    }

    nav a {
        width: 100%;
        background: #eef1ff;
        color: #11154a;
        padding: 9px 11px;
    }

    nav a.active,
    nav a:hover {
        background: #232a8b;
        color: #ffffff;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .filter-box {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 15px;
    }

    th,
    td {
        white-space: nowrap;
    }
}
.print-header {
    text-align: center;
    margin-bottom: 18px;
}

.print-header img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 5px;
}

.print-header h2 {
    margin: 0;
    color: #11154a;
    font-size: 22px;
    letter-spacing: 1px;
}

.print-header p {
    margin: 3px 0;
    color: #444;
}