/* ================================================================
   GIADEC PCRMS – Main Stylesheet
   Design: Refined Corporate | Palette: Deep Navy + Gold + Cream
   Font: DM Serif Display (headings) + DM Sans (body)
================================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --navy:        #0f2a52;
  --navy-light:  #1a3c6e;
  --navy-dark:   #091d3a;
  --gold:        #c8922a;
  --gold-light:  #f0b84a;
  --gold-pale:   #fef6e8;
  --cream:       #f7f4ef;
  --white:       #ffffff;
  --text:        #1a1a2e;
  --text-muted:  #6b7280;
  --text-light:  #9ca3af;
  --border:      #e5e7eb;
  --border-dark: #d1d5db;
  --bg:          #f3f4f8;
  --sidebar-w:   268px;
  --topbar-h:    64px;
  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   16px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:      0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:   0 10px 40px rgba(0,0,0,0.12);
  --transition:  all 0.2s ease;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold); }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
h1,h2,h3 { font-family: 'DM Serif Display', serif; font-weight: 400; line-height: 1.2; }

/* ── Layout ────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--navy-dark);
  display: flex; flex-direction: column;
  z-index: 200;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overflow-x: hidden;
}
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left 0.3s ease;
}
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  box-shadow: var(--shadow-sm);
}
.page-content {
  flex: 1;
  padding: 28px;
  max-width: 1400px;
}

/* ── Sidebar Brand ─────────────────────────────────────────── */
.sidebar-brand {
  padding: 22px 20px 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.brand-logo { display: flex; align-items: center; gap: 12px; }
.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-dark); font-size: 17px;
  flex-shrink: 0;
}
.brand-name { color: #fff; font-family: 'DM Serif Display', serif; font-size: 18px; line-height: 1; }
.brand-sub  { color: rgba(255,255,255,0.45); font-size: 10px; margin-top: 3px; letter-spacing: 0.5px; }
.sidebar-close-btn {
  display: none;
  background: none; border: none;
  color: rgba(255,255,255,0.5); font-size: 18px; padding: 4px;
}

/* ── Sidebar Nav ───────────────────────────────────────────── */
.sidebar-nav {
  flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px;
}
.nav-section-label {
  color: rgba(255,255,255,0.3);
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; padding: 14px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  font-size: 14px; font-weight: 500;
  transition: var(--transition);
}
.nav-item i { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(200,146,42,0.2), rgba(200,146,42,0.08));
  color: var(--gold-light);
  border-left: 3px solid var(--gold);
  padding-left: 9px;
}

/* ── Sidebar User ──────────────────────────────────────────── */
.sidebar-user {
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.sidebar-user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-dark); font-weight: 700; font-size: 14px; overflow: hidden;
}
.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user-name  { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.sidebar-user-role  { color: rgba(255,255,255,0.4); font-size: 11px; }

/* ── Topbar ────────────────────────────────────────────────── */
.topbar-menu-btn {
  display: none; background: none; border: none;
  color: var(--text-muted); font-size: 20px; padding: 6px;
}
.topbar-title { font-size: 16px; font-weight: 600; color: var(--navy); flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar-icon-btn {
  background: none; border: none; color: var(--text-muted);
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; position: relative;
  transition: var(--transition);
}
.topbar-icon-btn:hover { background: var(--bg); color: var(--navy); }
.topbar-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.topbar-avatar-initials {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy-light); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

/* ── Notification dropdown ─────────────────────────────────── */
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  background: #e53e3e; color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.notif-wrap, .user-menu-wrap { position: relative; }
.notif-dropdown, .user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 300;
}
.notif-dropdown { width: 340px; }
.user-dropdown  { width: 220px; }
.notif-dropdown.open, .user-dropdown.open { display: block; }
.notif-header {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 13px; color: var(--navy);
}
.notif-clear { font-size: 12px; color: var(--gold); font-weight: 400; }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; gap: 12px; align-items: flex-start;
  transition: var(--transition);
}
.notif-item:hover { background: var(--cream); }
.notif-item.unread { background: #eef4ff; }
.notif-item-icon { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.notif-item-icon.info    { background: #dbeafe; color: #2563eb; }
.notif-item-icon.success { background: #d1fae5; color: #059669; }
.notif-item-icon.warning { background: #fef3c7; color: #d97706; }
.notif-item-icon.danger  { background: #fee2e2; color: #dc2626; }
.notif-item-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-item-msg   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.notif-item-time  { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.notif-loading    { padding: 24px; text-align: center; color: var(--text-muted); }
.notif-empty      { padding: 28px; text-align: center; color: var(--text-muted); font-size: 13px; }
.user-dropdown-header {
  padding: 16px; border-bottom: 1px solid var(--border); background: var(--cream);
  border-radius: var(--radius) var(--radius) 0 0;
}
.user-dropdown-name  { font-weight: 600; font-size: 14px; color: var(--navy); }
.user-dropdown-email { font-size: 11px; color: var(--text-muted); margin-top: 2px; word-break: break-all; }
.user-dropdown-role  { display: inline-block; margin-top: 6px; background: var(--navy-light); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 12px; }
.user-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 13px; color: var(--text);
  border-bottom: 1px solid var(--border); transition: var(--transition);
}
.user-dropdown-item:hover { background: var(--bg); }
.user-dropdown-item.text-danger { color: #dc2626; }
.user-dropdown-item i { width: 16px; }

/* ── Flash alert ───────────────────────────────────────────── */
.flash-wrap { padding: 0 28px; padding-top: 16px; }
.alert {
  padding: 13px 18px; border-radius: var(--radius-sm);
  font-size: 14px; display: flex; align-items: center; gap: 12px;
  border-left: 4px solid transparent; position: relative;
}
.alert-success { background: #d1fae5; border-color: #059669; color: #065f46; }
.alert-danger   { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
.alert-warning  { background: #fef3c7; border-color: #d97706; color: #92400e; }
.alert-info     { background: #dbeafe; border-color: #2563eb; color: #1e40af; }
.alert-close    { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: inherit; opacity: 0.6; font-size: 14px; }
.alert-close:hover { opacity: 1; }

/* ── Page heading ──────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header h1 { font-size: 26px; color: var(--navy); }
.page-header-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.card-header h2, .card-header h3 {
  font-size: 16px; font-weight: 600; color: var(--navy); font-family: 'DM Sans', sans-serif;
}
.card-body { padding: 22px; }
.card-footer {
  padding: 14px 22px; border-top: 1px solid var(--border);
  background: var(--cream); border-radius: 0 0 var(--radius) var(--radius);
}

/* ── Stat Cards (Dashboard) ────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 20px;
  display: flex; align-items: center; gap: 18px;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-icon.navy    { background: #e8eef8; color: var(--navy); }
.stat-icon.gold    { background: var(--gold-pale); color: var(--gold); }
.stat-icon.green   { background: #d1fae5; color: #059669; }
.stat-icon.red     { background: #fee2e2; color: #dc2626; }
.stat-icon.purple  { background: #ede9fe; color: #7c3aed; }
.stat-value { font-size: 28px; font-family: 'DM Serif Display', serif; color: var(--navy); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-change { font-size: 11px; margin-top: 6px; }
.stat-change.up   { color: #059669; }
.stat-change.down { color: #dc2626; }

/* ── Grids ─────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.table th {
  background: var(--cream); color: var(--navy);
  font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 11px 16px; text-align: left; border-bottom: 2px solid var(--border-dark);
  white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:hover td { background: #fafbfc; }
.table tr:last-child td { border-bottom: none; }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px; white-space: nowrap;
}
.badge-secondary { background: #f3f4f6; color: #6b7280; }
.badge-warning   { background: #fef3c7; color: #92400e; }
.badge-info      { background: #dbeafe; color: #1e40af; }
.badge-success   { background: #d1fae5; color: #065f46; }
.badge-danger    { background: #fee2e2; color: #991b1b; }
.badge-primary   { background: #ede9fe; color: #5b21b6; }
.badge-dark      { background: #374151; color: #fff; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; border: none;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
  text-decoration: none; justify-content: center;
}
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-primary   { background: var(--navy); color: #fff; }
.btn-primary:hover   { background: var(--navy-light); }
.btn-gold      { background: var(--gold); color: #fff; }
.btn-gold:hover      { background: #b07820; }
.btn-success   { background: #059669; color: #fff; }
.btn-success:hover   { background: #047857; }
.btn-danger    { background: #dc2626; color: #fff; }
.btn-danger:hover    { background: #b91c1c; }
.btn-outline   { background: transparent; border: 1.5px solid var(--border-dark); color: var(--text); }
.btn-outline:hover   { border-color: var(--navy); color: var(--navy); background: var(--cream); }
.btn-outline-primary { background: transparent; border: 1.5px solid var(--navy); color: var(--navy); }
.btn-outline-primary:hover { background: var(--navy); color: #fff; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-row    { display: grid; gap: 18px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--navy); margin-bottom: 6px;
}
label .required { color: #dc2626; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border-dark); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text); background: var(--white);
  transition: var(--transition); outline: none;
}
.form-control:focus  { border-color: var(--navy-light); box-shadow: 0 0 0 3px rgba(26,60,110,0.1); }
.form-control.is-invalid { border-color: #dc2626; }
.form-hint   { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error  { font-size: 12px; color: #dc2626; margin-top: 4px; display: none; }
.form-control.is-invalid + .form-error { display: block; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* ── Items Table (Voucher Line Items) ──────────────────────── */
.items-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 16px; }
.items-table th { background: var(--navy-dark); color: #fff; padding: 10px 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-align: left; }
.items-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.items-table tr:hover td { background: var(--cream); }
.items-table .num { text-align: right; font-family: 'DM Serif Display', serif; }
.items-table tfoot td { font-weight: 700; background: var(--gold-pale); }
.items-table .delete-btn { background: none; border: none; color: #dc2626; cursor: pointer; padding: 4px; border-radius: 4px; }
.items-table .delete-btn:hover { background: #fee2e2; }
.add-item-row td { background: var(--cream); }

/* ── Status Timeline ───────────────────────────────────────── */
.timeline { padding: 8px 0; }
.timeline-item { display: flex; gap: 16px; padding: 12px 0; position: relative; }
.timeline-item:not(:last-child)::after {
  content: ''; position: absolute; left: 17px; top: 44px;
  width: 2px; height: calc(100% - 20px); background: var(--border);
}
.timeline-dot {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; z-index: 1;
}
.timeline-dot.submitted  { background: #dbeafe; color: #1d4ed8; }
.timeline-dot.approved   { background: #d1fae5; color: #059669; }
.timeline-dot.rejected   { background: #fee2e2; color: #dc2626; }
.timeline-dot.pending    { background: #f3f4f6; color: #9ca3af; border: 2px dashed #d1d5db; }
.timeline-dot.disbursed  { background: var(--gold-pale); color: var(--gold); }
.timeline-content { flex: 1; padding-top: 4px; }
.timeline-title   { font-weight: 600; font-size: 14px; color: var(--navy); }
.timeline-meta    { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.timeline-comment { background: var(--cream); border-left: 3px solid var(--border-dark); padding: 8px 12px; border-radius: 0 4px 4px 0; font-size: 13px; color: var(--text); margin-top: 6px; font-style: italic; }

/* ── File Upload ───────────────────────────────────────────── */
.file-drop {
  border: 2px dashed var(--border-dark); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; background: var(--cream);
  transition: var(--transition); cursor: pointer;
}
.file-drop:hover, .file-drop.drag-over { border-color: var(--navy); background: #eef2f9; }
.file-drop i { font-size: 32px; color: var(--text-light); display: block; margin-bottom: 10px; }
.file-drop p { color: var(--text-muted); font-size: 14px; }
.file-drop span { color: var(--navy); font-weight: 600; }
.file-list { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.file-chip {
  background: var(--white); border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm); padding: 6px 10px;
  font-size: 12px; display: flex; align-items: center; gap: 8px;
}
.file-chip-remove { background: none; border: none; color: #dc2626; cursor: pointer; font-size: 12px; padding: 0; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn {
  min-width: 34px; height: 34px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-dark); background: var(--white);
  color: var(--text-muted); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.page-btn:hover    { border-color: var(--navy); color: var(--navy); background: var(--cream); }
.page-btn.active   { background: var(--navy); border-color: var(--navy); color: #fff; }
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── Modals ────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(9,29,58,0.55); z-index: 500;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 520px;
  max-height: 90vh; display: flex; flex-direction: column;
  animation: slideUp 0.25s ease;
}
.modal-lg { max-width: 780px; }
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 17px; font-weight: 600; color: var(--navy); }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 20px; }
.modal-body   { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fadeIn   { from { opacity: 0; }            to { opacity: 1; } }
@keyframes slideUp  { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Login Page ────────────────────────────────────────────── */
body.login-page {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, #1e4b8e 100%);
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); padding: 48px 44px;
  width: 100%; max-width: 440px; position: relative; overflow: hidden;
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius); margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.login-logo-icon i { font-size: 28px; color: var(--gold); }
.login-logo h1 { font-size: 22px; color: var(--navy); }
.login-logo p  { font-size: 12px; color: var(--text-muted); margin-top: 4px; letter-spacing: 0.5px; }
.ms-login-btn {
  width: 100%; padding: 13px; border-radius: var(--radius-sm);
  background: #0078d4; color: #fff; font-size: 15px; font-weight: 500;
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px;
  transition: var(--transition);
}
.ms-login-btn:hover { background: #106ebe; }
.ms-login-btn svg { width: 20px; height: 20px; }
.login-divider {
  text-align: center; color: var(--text-muted); font-size: 12px;
  margin: 20px 0; position: relative;
}
.login-divider::before, .login-divider::after {
  content: ''; position: absolute; top: 50%; width: calc(50% - 40px);
  height: 1px; background: var(--border);
}
.login-divider::before { left: 0; }
.login-divider::after  { right: 0; }
.login-demo-info {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; font-size: 12px;
  color: var(--text-muted); margin-top: 20px;
}
.login-demo-info strong { color: var(--navy); }

/* ── Filter Bar ────────────────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.filter-bar .form-control { flex: 1; min-width: 200px; max-width: 300px; }
.search-wrap { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.search-wrap .fa-search { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 13px; }
.search-wrap .form-control { padding-left: 36px; }

/* ── Approval panel ────────────────────────────────────────── */
.approval-panel {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  border-radius: var(--radius); padding: 24px;
  color: var(--white);
}
.approval-panel h3 { color: var(--gold-light); font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.approval-panel .form-control { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: #fff; }
.approval-panel .form-control:focus { border-color: var(--gold); }
.approval-panel .form-control::placeholder { color: rgba(255,255,255,0.4); }
.approval-actions { display: flex; gap: 12px; margin-top: 16px; }

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-state i { font-size: 48px; color: var(--text-light); }
.empty-state h3 { font-size: 18px; color: var(--navy); font-family: 'DM Sans'; font-weight: 600; }
.empty-state p  { font-size: 14px; color: var(--text-muted); max-width: 320px; }

/* ── Voucher Print View ────────────────────────────────────── */
.voucher-print {
  background: var(--white); border: 2px solid var(--navy);
  max-width: 800px; margin: 0 auto; padding: 40px;
}
.voucher-print-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 2px solid var(--navy); }
.voucher-print-org-name { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--navy); }
.voucher-print-title { font-size: 16px; font-weight: 700; color: var(--gold); letter-spacing: 1px; text-align: right; }

/* ── Misc Utilities ────────────────────────────────────────── */
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted) !important; }
.text-navy   { color: var(--navy) !important; }
.text-gold   { color: var(--gold) !important; }
.text-green  { color: #059669 !important; }
.text-red    { color: #dc2626 !important; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.fs-12       { font-size: 12px !important; }
.fs-13       { font-size: 13px !important; }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-100  { width: 100%; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 0 100vw rgba(0,0,0,0.5); }
  .sidebar-close-btn { display: flex; }
  .main-wrapper { margin-left: 0; }
  .topbar-menu-btn { display: flex; }
  .page-content { padding: 18px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .search-wrap { max-width: 100%; }
  .modal { max-width: 100%; margin: 0; border-radius: var(--radius) var(--radius) 0 0; position: fixed; bottom: 0; left: 0; right: 0; max-height: 90vh; }
  .modal-overlay.open { align-items: flex-end; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .login-card { padding: 32px 24px; }
  .items-table { font-size: 13px; }
}

/* ── Print styles ──────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .flash-wrap, .btn, .filter-bar, .approval-panel, .no-print { display: none !important; }
  .main-wrapper { margin-left: 0; }
  .page-content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}
