:root{
  --brand-primary: #0b3d91; /* dark blue */
  --brand-accent:  #2e7d32; /* green */
  --brand-text:    #0f274a; /* deep blue for text */
  --muted-text:    #6c7a8a;
  --surface:       #ffffff;
  --surface-alt:   #f5f7fb;
  --border-color:  #e2e8f0;
}

body {
  background-color: var(--surface-alt);
  color: var(--brand-text);
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.93rem; /* slightly smaller base */
}

#app-wrapper { display: flex; }
#content { flex: 1; min-height: 100vh; }

body.sidebar-collapsed #sidebar{
  width: 72px !important;
  padding-left: .5rem !important;
  padding-right: .5rem !important;
}
body.sidebar-collapsed #sidebar .mb-3{ display:none; }
body.sidebar-collapsed #sidebar .nav-link{
  font-size: 0;
  padding-left: .5rem;
  padding-right: .5rem;
  text-align: center;
}
body.sidebar-collapsed #sidebar .nav-link i{
  font-size: 1rem;
  margin-right: 0 !important;
}
body.sidebar-collapsed #sidebar .btn-toggle-nav,
body.sidebar-collapsed #sidebar .collapse{ display:none !important; }

/* Top header bar */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border-color);
  padding: .5rem 1rem;
}
.app-header .brand {
  font-weight: 700;
  color: var(--brand-primary);
}
.app-header .user-name { color: var(--brand-text); }

/* Tables */
.table { font-size: 0.90rem; }
.table thead th { white-space: nowrap; color: var(--brand-text); }
/* Slightly tighter table cell padding */
.table > :not(caption) > * > * { padding: .45rem .55rem; }

/* Modals */
.modal .modal-header { background: var(--brand-primary); color: #fff; }
/* Make all modal close buttons white for visibility on colored headers */
.modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: .95;
}
.modal .btn-close:hover, .modal .btn-close:focus {
  opacity: 1;
  box-shadow: none;
}

/* Primary buttons */
.btn-primary { background-color: var(--brand-primary); border-color: var(--brand-primary); }
.btn-primary:hover, .btn-primary:focus { background-color: #093371; border-color: #093371; }

/* Accent buttons (success-like) */
.btn-success, .btn-outline-success:hover { background-color: var(--brand-accent); border-color: var(--brand-accent); }
.btn-outline-success { color: var(--brand-accent); border-color: var(--brand-accent); }

/* Nav links and tabs */
.nav-link { color: var(--brand-text); }
.nav-link.active { background-color: var(--brand-primary) !important; color: #fff !important; }
.nav-tabs .nav-link { font-weight: 600; color: var(--brand-text); }
.nav-tabs .nav-link.active { color: var(--brand-primary); border-color: var(--brand-primary) var(--brand-primary) transparent; }

/* Badges, chips */
.badge.text-bg-secondary { background-color: var(--brand-primary) !important; }

/* Forms focus */
.form-control:focus, .form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 .2rem rgba(11,61,145,.15);
}

/* Compact forms and buttons */
.form-control, .form-select { font-size: 0.90rem; }
.input-group-text { font-size: 0.90rem; }
.btn { font-size: 0.90rem; }

/* Modal content a bit denser */
.modal .modal-body, .modal .modal-footer, .modal .modal-header { font-size: 0.93rem; }

/* Cards */
.card { border-color: var(--border-color); }
.card-header { background: var(--surface); color: var(--brand-text); }

/* Sidebar collapse arrow */
.collapse + .bi { transition: transform .2s ease; }
[aria-expanded="true"] .bi { transform: rotate(180deg); }
