:root {
    --brand: #14532d;
    --brand-dark: #0d3b20;
    --sidebar-w: 220px;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
}

body {
    background: #f6f7f9;
    color: var(--ink);
    font-size: 14px;
}

/* ---------- chrome ---------- */
.topbar {
    background: var(--brand);
    height: 52px;
}

.layout {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 52px);
}

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 12px 0;
}

.sidebar .nav-link {
    color: var(--ink);
    padding: 7px 18px;
    border-left: 3px solid transparent;
    border-radius: 0;
    text-decoration: none;
}

.sidebar .nav-link:hover { background: #f1f5f3; }

.sidebar .nav-link.active {
    background: #eaf2ec;
    border-left-color: var(--brand);
    color: var(--brand);
    font-weight: 600;
}

.sidebar .nav-heading {
    padding: 14px 18px 4px;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.content {
    flex: 1 1 auto;
    padding: 20px 24px 48px;
    min-width: 0;
}

@media (max-width: 991.98px) {
    .sidebar { display: none; }
    body.nav-open .sidebar {
        display: block;
        position: fixed;
        top: 52px;
        bottom: 0;
        left: 0;
        z-index: 1030;
        overflow-y: auto;
        box-shadow: 0 6px 24px rgba(0,0,0,.15);
    }
}

/* ---------- page furniture ---------- */
.page-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 16px;
}

.card {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
}

.stat-card .stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
}

.stat-card .stat-note { font-size: 12px; color: var(--muted); }

.stat-in .stat-value  { color: #15803d; }
.stat-out .stat-value { color: #b91c1c; }

/* ---------- tables ---------- */
.table { font-size: 13.5px; }

.table > thead > tr > th {
    background: #f3f4f6;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #4b5563;
    white-space: nowrap;
}

.table td, .table th { vertical-align: middle; }

.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge-in  { background: #dcfce7; color: #166534; }
.badge-out { background: #fee2e2; color: #991b1b; }

/* ---------- entry grid ---------- */
.grid-table td { padding: 4px; }
.grid-table .form-control,
.grid-table .form-select { font-size: 13px; }
.grid-table input.num { text-align: right; }
.row-no { width: 34px; text-align: center; color: var(--muted); }

/* ---------- login ---------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
