:root {
  --sikubah-nav-accent: #c89830;
  --sikubah-primary: #0d6efd;
  --sikubah-primary-dark: #0a58ca;
  --sikubah-primary-soft: #eaf2ff;
  --sikubah-sidebar: #171717;
  --sikubah-sidebar-muted: #b8bcc2;
  --sikubah-bg: #eff1f3;
  --sikubah-text: #212529;
  --sikubah-muted: #6c757d;
}

body {
  min-height: 100vh;
  background: var(--sikubah-bg);
  color: var(--sikubah-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a,
.btn-link { color: var(--sikubah-primary-dark); }
a:hover,
.btn-link:hover { color: #084298; }

.top-header .navbar {
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 2px 10px rgba(33, 37, 41, .06);
}
.btn-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #dee2e6;
  color: var(--sikubah-text);
  font-size: 1.25rem;
}
.btn-toggle:hover,
.btn-toggle:focus-visible { background: #f1f3f5; border-color: #adb5bd; }
.header-title { color: var(--sikubah-text); }

.sidebar-wrapper,
.sidebar-wrapper .sidebar-header,
.sidebar-wrapper .sidebar-nav { background: var(--sikubah-sidebar); border-color: rgba(255, 255, 255, .08); }
.sidebar-wrapper .sidebar-header { justify-content: space-between; height: 84px; }
.sidebar-wrapper .sidebar-nav { margin-top: 84px; height: calc(100% - 84px); overflow-y: auto; }
.admin-brand { display: flex; align-items: center; gap: .7rem; min-width: 0; color: #fff; text-decoration: none; }
.admin-brand:hover { color: #fff; }
.admin-brand-logo { width: 64px; height: 56px; flex: 0 0 64px; object-fit: contain; }
.logo-name strong { display: block; color: var(--sikubah-nav-accent); font-size: 1.05rem; letter-spacing: .08em; }
.logo-name small { display: block; color: var(--sikubah-sidebar-muted); font-size: .7rem; white-space: nowrap; }
.sidebar-wrapper .sidebar-header .sidebar-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
}
.sidebar-wrapper .sidebar-header .sidebar-close:hover,
.sidebar-wrapper .sidebar-header .sidebar-close:focus-visible { background: rgba(200, 152, 48, .18); }
.sidebar-wrapper .menu-label { color: #938a78; }
.sidebar-wrapper .sidebar-nav .metismenu a { color: #ded8cc; padding: .7rem 1rem; }
.sidebar-wrapper .sidebar-nav .metismenu a:hover,
.sidebar-wrapper .sidebar-nav .metismenu a:focus,
.sidebar-wrapper .sidebar-nav .metismenu .mm-active > a {
  color: #fff;
  background: rgba(200, 152, 48, .2);
  box-shadow: inset 3px 0 0 var(--sikubah-nav-accent);
}
.sidebar-wrapper .sidebar-nav .parent-icon { display: inline-flex; width: 1.25rem; justify-content: center; color: var(--sikubah-nav-accent); }
.sidebar-wrapper .sidebar-nav .menu-title { margin-left: .65rem; }

.main-wrapper .main-content { padding: 1.5rem; }
.page-heading { margin-bottom: 1.5rem; }
.page-heading > .no-print { flex-wrap: wrap; }
.page-heading h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.page-heading p { color: var(--sikubah-muted); margin: .35rem 0 0; }
.card { border: 0; border-radius: .85rem; box-shadow: 0 4px 18px rgba(33, 37, 41, .07); }
.stat-card { border-left: 4px solid var(--sikubah-primary); }
.stat-card--green { border-left-color: #02c27a; }
.stat-card--blue { border-left-color: #0d6efd; }
.stat-card--pink { border-left-color: #fc185a; }
.stat-card--orange { border-left-color: #fd7e14; }
.stat-label { color: var(--sikubah-muted); font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.stat-value { font-size: 1.5rem; font-weight: 750; margin-top: .35rem; }

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--sikubah-primary);
  --bs-btn-border-color: var(--sikubah-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--sikubah-primary-dark);
  --bs-btn-hover-border-color: var(--sikubah-primary-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #0a53be;
  --bs-btn-active-border-color: #0a53be;
  --bs-btn-focus-shadow-rgb: 13, 110, 253;
}
.form-control:focus,
.form-select:focus { border-color: #86b7fe; box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25); }
.text-brand { color: var(--sikubah-primary-dark) !important; }

.table > :not(caption) > * > * { padding: .8rem .75rem; vertical-align: middle; }
.table thead th { background: #f8f9fa; color: #495057; font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.form-label { font-weight: 600; }
.required::after { content: " *"; color: #dc3545; }
.expense-row { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: .75rem; padding: 1rem; margin-bottom: .75rem; }
.money-preview { font-variant-numeric: tabular-nums; font-weight: 700; }
.login-brand-logo { width: 220px; height: 112px; max-width: 100%; object-fit: cover; object-position: center 48%; }
.item-name-field { position: relative; }
.item-suggestions { position: absolute; z-index: 1060; top: 100%; left: calc(var(--bs-gutter-x) * .5); right: calc(var(--bs-gutter-x) * .5); max-height: 230px; overflow-y: auto; background: #fff; border: 1px solid #ced4da; border-radius: .5rem; box-shadow: 0 10px 25px rgba(33, 37, 41, .14); }
.item-suggestions[hidden] { display: none; }
.item-suggestion { display: block; width: 100%; padding: .65rem .8rem; text-align: left; background: #fff; border: 0; border-bottom: 1px solid #f1f3f5; }
.item-suggestion:last-child { border-bottom: 0; }
.item-suggestion:hover,
.item-suggestion.active { background: var(--sikubah-primary-soft); color: var(--sikubah-primary-dark); }
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--sikubah-muted); }
.receipt-image { max-height: 520px; width: auto; max-width: 100%; border-radius: .75rem; border: 1px solid #e2e8f0; }
.receipt-modal-body { min-height: 280px; display: flex; align-items: center; justify-content: center; background: #f8f9fa; }
.receipt-modal-image { display: block; max-width: 100%; max-height: calc(100vh - 220px); object-fit: contain; border-radius: .5rem; }
.receipt-modal-image[hidden],
[data-receipt-error][hidden] { display: none !important; }
.dashboard-chart { min-height: 330px; }
.chart-tooltip { padding: .7rem .8rem; min-width: 170px; background: #fff; color: var(--sikubah-text); box-shadow: 0 5px 18px rgba(33, 37, 41, .16); }
.chart-tooltip strong { display: block; margin-bottom: .35rem; }
.chart-tooltip span { display: block; color: var(--sikubah-muted); font-size: .78rem; line-height: 1.55; }

@media (max-width: 1199px) {
  .main-wrapper .main-content { padding: 1rem; }
}

@media (max-width: 575.98px) {
  .page-heading > .no-print { width: 100%; }
}

@media (min-width: 1199px) {
  body.toggled:not(.sidebar-hovered) .admin-brand-logo { width: 44px; height: 44px; flex-basis: 44px; }
}

@media print {
  .sidebar-wrapper,
  .top-header,
  .overlay,
  .no-print,
  .alert { display: none !important; }
  .main-wrapper { margin: 0; padding: 0; }
  .main-wrapper .main-content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  body { background: #fff; font-size: 11px; }
}
