/* COLLEGE FINANCE ERP - navy & white theme with green financial indicators */
:root {
  --navy-900: #071d36;
  --navy-800: #0b2a4a;
  --navy-700: #12395f;
  --navy-600: #1b4b7a;
  --navy-100: #e8eef6;
  --green: #1e8e5a;
  --green-soft: #e3f4ec;
  --red: #c0392b;
  --sidebar-w: 252px;
  --bs-body-font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-size: .9rem;
  --bs-primary: #12395f;
  --bs-primary-rgb: 18, 57, 95;
  --bs-link-color: #1b4b7a;
  --bs-link-color-rgb: 27, 75, 122;
}
body { background: #f3f6fa; color: #1f2d3d; }
.btn-primary { --bs-btn-bg: var(--navy-700); --bs-btn-border-color: var(--navy-700); --bs-btn-hover-bg: var(--navy-800); --bs-btn-hover-border-color: var(--navy-800); --bs-btn-active-bg: var(--navy-900); }
.btn-outline-primary { --bs-btn-color: var(--navy-700); --bs-btn-border-color: var(--navy-700); --bs-btn-hover-bg: var(--navy-700); --bs-btn-hover-border-color: var(--navy-700); }
.btn-success { --bs-btn-bg: var(--green); --bs-btn-border-color: var(--green); }
.text-navy { color: var(--navy-800) !important; }
.bg-navy { background: var(--navy-800) !important; }
.text-pos { color: var(--green) !important; }
.text-neg { color: var(--red) !important; }

/* shell */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: linear-gradient(180deg, var(--navy-800), var(--navy-900)); color: #cfdcec; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 1030; transition: transform .2s ease; }
.sidebar .brand { display: flex; align-items: center; gap: .65rem; padding: 1rem 1.1rem; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 1.2rem; }
.brand-logo { width: 38px; height: 38px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { color: #8fb0d6; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.nav-scroll { overflow-y: auto; flex: 1; padding: .5rem 0; }
.sidebar .nav-link { color: #cfdcec; display: flex; align-items: center; gap: .7rem; padding: .52rem 1.1rem; font-size: .88rem; border-left: 3px solid transparent; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.09); border-left-color: #4fc38a; }
.sidebar .nav-link i { font-size: 1.02rem; width: 1.2rem; text-align: center; }
.sidebar .caret { margin-left: auto; font-size: .7rem !important; transition: transform .2s; }
.sidebar .nav-toggle:not(.collapsed) .caret { transform: rotate(180deg); }
.sidebar .sub .nav-link { padding: .38rem 1.1rem .38rem 3rem; font-size: .83rem; }
.sidebar-foot { padding: .6rem 1.1rem; color: #6f8fb4; border-top: 1px solid rgba(255,255,255,.08); }
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; transition: margin .2s ease; }
.topbar { background: var(--navy-700); height: 56px; display: flex; align-items: center; padding: 0 1.25rem; position: sticky; top: 0; z-index: 1020; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.content { padding: 1.25rem 1.5rem 3rem; }
.app-shell.collapsed .sidebar { transform: translateX(-100%); }
.app-shell.collapsed .main { margin-left: 0; }
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; }
  .app-shell.open .sidebar { transform: none; }
}
.notif-menu { width: 340px; max-height: 70vh; overflow-y: auto; }
.notif-item { white-space: normal; border-bottom: 1px solid #f0f0f0; }
.notif-item.unread { background: #f1f6fd; }
.tiny { font-size: .72rem; }

/* page */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.35rem; margin: 0; color: var(--navy-800); font-weight: 600; }
.page-head .actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.card { border: 0; border-radius: .6rem; box-shadow: 0 1px 3px rgba(16,40,70,.08); }
.card-header { background: #fff; border-bottom: 1px solid #edf1f6; font-weight: 600; color: var(--navy-800); }
.table { --bs-table-hover-bg: #f4f8fd; }
.table thead th { background: var(--navy-100); color: var(--navy-800); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; border-bottom: 0; white-space: nowrap; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr.row-section td { background: #f7f9fc; font-weight: 700; color: var(--navy-800); }
.table tr.row-subtotal td { font-weight: 600; }
.table tr.row-total td { font-weight: 700; border-top: 2px solid var(--navy-700); background: #fbfcfe; }
.status-badge { font-weight: 500; letter-spacing: .01em; }
.kv dt { color: #6b7c93; font-weight: 500; font-size: .8rem; }
.kv dd { margin-bottom: .6rem; }

/* dashboard */
.kpi { border-radius: .7rem; background: #fff; padding: 1rem 1.1rem; box-shadow: 0 1px 3px rgba(16,40,70,.08); height: 100%; border-top: 3px solid var(--navy-700); }
.kpi .label { color: #6b7c93; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 1.35rem; font-weight: 700; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.kpi.green { border-top-color: var(--green); }
.kpi.red { border-top-color: var(--red); }
.kpi.amber { border-top-color: #e0a100; }
.kpi .sub { font-size: .78rem; color: #6b7c93; }
.chart-box { position: relative; height: 280px; }
.progress { height: .6rem; }

/* line editor */
.line-table td { vertical-align: top; padding: .3rem; }
.line-table .form-control, .line-table .form-select { font-size: .85rem; padding: .3rem .5rem; }
.line-table tfoot td { font-weight: 700; }
.money-input { font-variant-numeric: tabular-nums; }
.diff-bad { color: var(--red); }
.diff-ok { color: var(--green); }

/* guest */
.guest-body { background: radial-gradient(circle at 20% 10%, var(--navy-600), var(--navy-900)); min-height: 100vh; }
.guest-wrap { max-width: 430px; margin: 0 auto; padding: 6vh 1rem; }
.guest-card { background: #fff; border-radius: 1rem; overflow: hidden; }
.guest-brand { background: var(--navy-800); color: #fff; text-align: center; padding: 1.6rem 1rem; }

/* reports */
.report-head { text-align: center; margin-bottom: 1rem; }
.report-head h2 { font-size: 1.2rem; color: var(--navy-800); margin: 0; }
.report-meta { font-size: .8rem; color: #6b7c93; }
.indent-1 { padding-left: 1.4rem !important; }
.indent-2 { padding-left: 2.6rem !important; }
.check-ok { color: var(--green); }
.check-bad { color: var(--red); }
.filter-bar .form-label { font-size: .75rem; color: #6b7c93; margin-bottom: .15rem; }
@media print {
  .sidebar, .topbar, .no-print, .breadcrumb, .page-head .actions, .dataTables_filter, .dt-search, .dt-length, .dt-paging, .dt-info { display: none !important; }
  .main { margin: 0 !important; }
  .content { padding: 0 !important; }
  .card { box-shadow: none !important; }
  body { background: #fff; }
}
