:root {
    --brand: #8a4b2a;
    --brand-dark: #6b3519;
    --brand-soft: #f6ede6;
    --cream: #fbf8f4;
    --sidebar-w: 236px;
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body { background: var(--cream); font-size: .925rem; }
a { color: var(--brand); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-outline-brand { border-color: var(--brand); color: var(--brand); }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }
.text-brand { color: var(--brand) !important; }
.bg-brand-soft { background: var(--brand-soft) !important; }
.bg-teal { background-color: #0f8a7e !important; color: #fff; }
.bg-indigo { background-color: #5b4bc4 !important; color: #fff; }
.text-bg-teal { background-color: #0f8a7e !important; color: #fff !important; }

/* Sidebar */
.sidebar { width: var(--sidebar-w); background: #2b1d16; min-height: 100vh; position: fixed; top: 0; left: 0; z-index: 1030; overflow-y: auto; }
.sidebar .brand { color: #fff; font-weight: 700; padding: 1rem 1.1rem; display: flex; gap: .55rem; align-items: center; text-decoration: none; font-size: 1.02rem; line-height: 1.15; }
.sidebar .brand i { font-size: 1.5rem; color: #f2b880; }
.sidebar .nav-link { color: #d9cbc1; padding: .5rem 1.1rem; border-left: 3px solid transparent; display: flex; gap: .65rem; align-items: center; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.sidebar .nav-link.active { color: #fff; background: rgba(242,184,128,.12); border-left-color: #f2b880; }
.sidebar .nav-section { color: #8e7a6d; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: .9rem 1.1rem .3rem; }
.main { margin-left: var(--sidebar-w); min-height: 100vh; }
.topbar { background: #fff; border-bottom: 1px solid #eee3da; position: sticky; top: 0; z-index: 1020; }
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s; }
    .sidebar.show { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
    .main { margin-left: 0; }
}

.card { border: 1px solid #efe5dc; box-shadow: 0 1px 2px rgba(60,30,10,.04); }
.card-header { background: #fff; border-bottom: 1px solid #f1e8e0; font-weight: 600; }
.kpi { border-radius: .6rem; }
.kpi .kpi-label { font-size: .78rem; color: #7b6a5f; text-transform: uppercase; letter-spacing: .03em; }
.kpi .kpi-value { font-size: 1.55rem; font-weight: 700; color: #2b1d16; line-height: 1.2; }
.kpi .kpi-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; }
a.kpi-link { text-decoration: none; color: inherit; }
a.kpi-link:hover .kpi { border-color: var(--brand); }
.badge-status { font-weight: 600; font-size: .74rem; }
.table > :not(caption) > * > * { padding: .55rem .6rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: #7b6a5f; font-weight: 600; background: #fcf9f6; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-col { min-width: 270px; }
.board-card { border-left: 4px solid #d9c6b6; }
.board-card.urgent { border-left-color: #dc3545; }
.board-card.soon { border-left-color: #fd7e14; }
.page-title { font-size: 1.35rem; font-weight: 700; color: #2b1d16; margin: 0; }
.item-row { background: #fcf9f6; border: 1px solid #f0e6dd; border-radius: .5rem; }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: .4rem; border: 1px solid #eee; }
.timeline { list-style: none; padding-left: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 .9rem 1.2rem; border-left: 2px solid #eadbcf; margin-left: .3rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .25rem; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.cal { table-layout: fixed; }
.cal td { height: 92px; vertical-align: top; font-size: .78rem; }
.cal .day-num { font-weight: 700; color: #7b6a5f; }
.cal .today { background: var(--brand-soft); }
.offline-banner { display: none; }
body.is-offline .offline-banner { display: block; }
@media print {
    .sidebar, .topbar, .no-print, .btn { display: none !important; }
    .main { margin: 0; }
    body { background: #fff; }
    .card { border: 0; box-shadow: none; }
}
