:root {
    --side: #14213d;
    --side-text: #c9d1e3;
    --accent: #0f9d76;
    --accent-dark: #0b7a5b;
    --bg: #f4f6fa;
}
body { background: var(--bg); font-size: .925rem; }
.app { display: flex; min-height: 100vh; }

.sidebar { width: 240px; background-color: var(--side) !important; color: var(--side-text); display: flex; flex-direction: column; flex-shrink: 0; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; } }
.sidebar .brand { padding: 1.1rem 1.25rem; font-weight: 600; color: #fff; display: flex; gap: .6rem; align-items: center; font-size: 1.05rem; }
.sidebar .brand i { color: var(--accent); font-size: 1.4rem; }
.sidebar .nav-link { color: var(--side-text); padding: .55rem 1.25rem; border-left: 3px solid transparent; }
.sidebar .nav-link i { width: 1.4rem; display: inline-block; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.08); border-left-color: var(--accent); }
.sidebar .nav-heading { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: 1rem 1.25rem .3rem; color: #7d89a6; }
.sidebar-foot { margin-top: auto; padding: 1rem 1.25rem; display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.08); }

.btn-accent { background: var(--accent); color: #fff; border: 0; }
.btn-accent:hover, .btn-accent:focus { background: var(--accent-dark); color: #fff; }

.content { flex: 1; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid #e3e7ef; padding: .75rem 1.5rem; display: flex; gap: .75rem; align-items: center; position: sticky; top: 0; z-index: 10; }

.card { border: 1px solid #e3e7ef; box-shadow: 0 1px 2px rgba(20,33,61,.04); }
.card-header { background: #fff; font-weight: 600; }
.stat .label { font-size: .75rem; color: #6c757d; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.table td, .table th { vertical-align: middle; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; font-weight: 600; background: #f8f9fb; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.badge-draft { background: #e9ecef; color: #495057; }
.badge-final { background: #d1e7dd; color: #0f5132; }
.badge-cancelled { background: #f8d7da; color: #842029; }
.badge-unpaid { background: #fff3cd; color: #664d03; }
.badge-partial { background: #cfe2ff; color: #084298; }
.badge-paid { background: #d1e7dd; color: #0f5132; }

/* invoice editor */
#lines td { padding: .3rem; }
#lines .form-control, #lines .form-select { font-size: .875rem; }
#lines .w-qty { width: 80px; } #lines .w-rate { width: 120px; } #lines .w-disc { width: 70px; } #lines .w-gst { width: 85px; } #lines .w-sac { width: 95px; } #lines .w-unit { width: 75px; }
.totals-box td { padding: .25rem .5rem; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #14213d, #1f3a68); }
