:root {
    --ledger-border: #c9ced6;
}

body {
    font-family: "Segoe UI", "Noto Sans", "Myanmar Text", system-ui, -apple-system, sans-serif;
}

/* ----------------------------- Login page ----------------------------- */
.login-page {
    background: linear-gradient(135deg, #1f2937 0%, #0f766e 100%);
    min-height: 100vh;
}

.login-logo {
    font-size: 2.6rem;
    color: #0f766e;
    line-height: 1;
}

/* ----------------------------- Stat cards ----------------------------- */
.stat-card .card-body {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: .35rem;
}

.stat-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6c757d;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}

/* ------------------------------- Ledger ------------------------------- */
.ledger-scroll {
    max-height: 68vh;
    overflow: auto;
}

.ledger-table {
    font-size: .875rem;
    white-space: nowrap;
}

.ledger-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background-color: #212529;
    color: #fff;
    vertical-align: middle;
}

.ledger-table thead tr:nth-child(2) th {
    top: 38px;
}

.ledger-table .grade-col {
    cursor: pointer;
    min-width: 90px;
}

.ledger-table .grade-col.is-active {
    background-color: #0d6efd !important;
    color: #fff !important;
    box-shadow: inset 0 0 0 2px #fff;
}

.qty-purchase {
    color: #146c43;
}

.qty-received {
    color: #b02a37;
}

.ledger-table .notes-cell {
    white-space: normal;
    max-width: 220px;
}

.ledger-summary th,
.ledger-summary td {
    background-color: #f8f9fa;
    font-size: .85rem;
}

.ledger-summary tr.table-primary th,
.ledger-summary tr.table-primary td {
    --bs-table-bg: #cfe2ff;
    font-size: .95rem;
}

/* ------------------------- Print / PDF output ------------------------- */
.print-only {
    display: none;
}

@media print {
    .d-print-none,
    .navbar,
    footer {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .print-only {
        display: block;
        margin-bottom: 12px;
    }

    .card {
        border: 0 !important;
        box-shadow: none !important;
    }

    .ledger-scroll {
        max-height: none;
        overflow: visible;
    }

    .ledger-table {
        font-size: 11px;
        white-space: normal;
    }

    .ledger-table thead th {
        position: static;
        background: #dee2e6 !important;
        color: #000 !important;
    }

    @page {
        size: landscape;
        margin: 10mm;
    }
}
