:root {
  --primary: #2d6a4f;
  --primary-dark: #1b4332;
  --primary-light: #52b788;
  --primary-bg: #d8f3dc;
  --gold: #d4a017;
  --gold-light: #fff8e1;
  --white: #ffffff;
  --bg: #f4f7f5;
  --card-shadow: 0 2px 16px rgba(45,106,79,0.10);
  --border: #dde8e2;
  --text-primary: #1a2e20;
  --text-secondary: #5a7065;
  --danger: #c0392b;
  --warning: #e67e22;
  --success: #1a7a3c;
  --info: #1a6b8a;
  --sidebar-width: 260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand .brand-icon {
  width: 44px; height: 44px;
  background: var(--gold);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.sidebar-brand .brand-text h2 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.sidebar-brand .brand-text p {
  color: rgba(255,255,255,0.6);
  font-size: 11px;
}

.sidebar-user {
  margin: 12px 16px;
  padding: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user .user-avatar {
  width: 36px; height: 36px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  flex-shrink: 0;
}
.sidebar-user .user-info p { color: #fff; font-size: 12px; font-weight: 600; }
.sidebar-user .user-info span { color: rgba(255,255,255,0.55); font-size: 10px; }

.sidebar-nav { padding: 8px 12px; flex: 1; }

.nav-section-label {
  color: rgba(255,255,255,0.4);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 8px 6px;
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 2px;
  cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.18); color: #fff; font-weight: 600; }
.nav-item .nav-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-footer a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 13px;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
}
.sidebar-footer a:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== TOPBAR ===== */
.topbar {
  background: #fff;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  gap: 16px;
}

.topbar .page-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.topbar .breadcrumb { font-size: 12px; color: var(--text-secondary); }
.topbar .breadcrumb a { color: var(--primary); text-decoration: none; }
.topbar .breadcrumb a:hover { text-decoration: underline; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.topbar-btn {
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  transition: all 0.2s;
  position: relative;
}
.topbar-btn:hover { background: var(--bg); color: var(--primary); }
.topbar-btn .badge {
  position: absolute; top: 4px; right: 4px;
  width: 16px; height: 16px;
  background: var(--danger);
  border-radius: 50%;
  font-size: 9px;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

.topbar-date { font-size: 12px; color: var(--text-secondary); }

/* ===== PAGE CONTENT ===== */
.page-content { padding: 24px; flex: 1; }

/* ===== CARDS ===== */
.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.card-header .card-header-sub { font-size: 12px; color: var(--text-secondary); }

.card-body { padding: 20px; }

/* ===== STAT CARDS ===== */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }

.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(45,106,79,0.15); }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.stat-icon.green { background: #d8f3dc; }
.stat-icon.blue { background: #dbeafe; }
.stat-icon.orange { background: #fde8cc; }
.stat-icon.red { background: #fde2e2; }
.stat-icon.purple { background: #ede9fe; }
.stat-icon.gold { background: var(--gold-light); }

.stat-info .stat-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.stat-info .stat-value { font-size: 26px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-info .stat-change { font-size: 11px; margin-top: 4px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ===== GRID LAYOUTS ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-7-3 { display: grid; grid-template-columns: 7fr 3fr; gap: 20px; }
.grid-6-4 { display: grid; grid-template-columns: 6fr 4fr; gap: 20px; }
.mb-20 { margin-bottom: 20px; }

/* ===== TABLES ===== */
.table-wrapper { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  background: #f8faf9;
  padding: 11px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f4f1;
  font-size: 13.5px;
  color: var(--text-primary);
}
tbody tr:hover { background: #f8fbf9; }
tbody tr:last-child td { border-bottom: none; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: #f1f5f9; color: #475569; }
.badge-primary { background: var(--primary-bg); color: var(--primary-dark); }
.badge-gold { background: var(--gold-light); color: #78540a; }
.badge-purple { background: #ede9fe; color: #5b21b6; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { filter: brightness(0.92); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-info { background: var(--info); color: #fff; }
.btn-outline {
  background: #fff; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-bg); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 7px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 6px; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text-primary); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.form-label .required { color: var(--danger); margin-left: 3px; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--text-primary);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}
.form-control::placeholder { color: #aab5ae; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ===== SEARCH BAR ===== */
.search-bar {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-bar .search-icon {
  position: absolute; left: 12px;
  font-size: 16px; color: var(--text-secondary);
  pointer-events: none;
}
.search-bar input {
  padding-left: 38px;
  width: 280px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding-top: 9px; padding-bottom: 9px;
  font-size: 13.5px;
  background: #fff;
  font-family: inherit;
  color: var(--text-primary);
}
.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ===== AVATAR ===== */
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

/* ===== TABS ===== */
.tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.tab-item {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap;
  border-radius: 8px 8px 0 0;
}
.tab-item:hover { color: var(--primary); background: var(--primary-bg); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); background: transparent; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: translateY(20px);
  transition: transform 0.2s;
}
.modal-overlay.show .modal { transform: translateY(0); }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--text-secondary);
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--bg); color: var(--text-primary); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }
.empty-state p { font-size: 13px; }

/* ===== PROGRESS BAR ===== */
.progress { background: var(--bg); border-radius: 20px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 20px; background: var(--primary); transition: width 0.6s; }
.progress-bar.gold { background: var(--gold); }
.progress-bar.danger { background: var(--danger); }
.progress-bar.info { background: var(--info); }

/* ===== INFO ROW ===== */
.info-row { display: flex; gap: 8px; padding: 10px 0; border-bottom: 1px solid #f0f4f1; align-items: flex-start; }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 12px; color: var(--text-secondary); font-weight: 600; min-width: 140px; flex-shrink: 0; }
.info-value { font-size: 13.5px; color: var(--text-primary); }

/* ===== ACTIVITY LIST ===== */
.activity-item {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid #f0f4f1;
  align-items: flex-start;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.activity-text .title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.activity-text .sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.activity-time { margin-left: auto; font-size: 11px; color: var(--text-secondary); white-space: nowrap; padding-top: 2px; }

/* ===== MINI CHART ===== */
.mini-chart { display: flex; align-items: flex-end; gap: 5px; height: 60px; }
.mini-bar {
  flex: 1;
  background: var(--primary-bg);
  border-radius: 4px 4px 0 0;
  transition: all 0.3s;
  position: relative;
  cursor: pointer;
}
.mini-bar:hover { background: var(--primary); }
.mini-bar.active { background: var(--primary); }
.mini-bar .bar-label {
  position: absolute; bottom: -18px;
  width: 100%; text-align: center;
  font-size: 10px; color: var(--text-secondary);
}

/* ===== ALERT ===== */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13.5px;
}
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.alert-danger { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid #f59e0b; }
.alert-info { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }

/* ===== SURAT PREVIEW ===== */
.surat-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 40px;
  max-width: 680px;
  margin: 0 auto;
  font-family: 'Times New Roman', serif;
  font-size: 12pt;
  line-height: 1.8;
}
.surat-preview .kop-surat { text-align: center; border-bottom: 3px double #000; padding-bottom: 12px; margin-bottom: 20px; }
.surat-preview .kop-surat h2 { font-size: 16pt; font-weight: 900; letter-spacing: 1px; }
.surat-preview .kop-surat p { font-size: 10pt; }
.surat-preview .surat-title { text-align: center; margin: 20px 0 24px; }
.surat-preview .surat-title h3 { font-size: 14pt; font-weight: 700; text-decoration: underline; }
.surat-preview .surat-body p { margin-bottom: 10px; text-align: justify; }
.surat-preview .tanda-tangan { margin-top: 40px; float: right; text-align: center; min-width: 200px; }
.surat-preview .ttd-space { height: 70px; }
.surat-preview .clearfix::after { content: ''; display: table; clear: both; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex; align-items: center; gap: 4px;
  justify-content: center;
  padding: 16px 0 4px;
}
.page-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== TOOLTIP ===== */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px);
  left: 50%; transform: translateX(-50%);
  background: var(--text-primary);
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 999;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ===== TOAST ===== */
.toast-container {
  position: fixed; top: 72px; right: 20px;
  z-index: 1000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  border-left: 4px solid var(--primary);
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px;
  min-width: 280px;
  max-width: 360px;
  animation: slideIn 0.3s ease;
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ===== PROFILE CARD ===== */
.profile-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: 14px;
  padding: 24px;
  color: #fff;
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.profile-hero::before {
  content: '';
  position: absolute; right: -30px; top: -30px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.profile-photo {
  width: 84px; height: 84px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
  font-weight: 700;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.4);
}
.profile-hero .profile-name { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.profile-hero .profile-sub { font-size: 13px; opacity: 0.8; }
.profile-hero .profile-badges { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.profile-hero .profile-badges .badge { background: rgba(255,255,255,0.2); color: #fff; }
.profile-actions { margin-left: auto; display: flex; flex-direction: column; gap: 8px; }

/* ===== DOT STATUS ===== */
.status-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
}
.status-dot::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-dot.green { color: var(--success); }
.status-dot.red { color: var(--danger); }
.status-dot.orange { color: var(--warning); }

/* ===== DOCUMENT ITEM ===== */
.doc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.2s;
  cursor: pointer;
}
.doc-item:hover { border-color: var(--primary); background: var(--primary-bg); }
.doc-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.doc-info .doc-name { font-size: 13.5px; font-weight: 600; }
.doc-info .doc-meta { font-size: 11.5px; color: var(--text-secondary); }
.doc-actions { margin-left: auto; display: flex; gap: 6px; }

/* ===== CHART BARS ===== */
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-bottom: 24px; position: relative; }
.chart-bar-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.chart-bar {
  width: 100%; border-radius: 6px 6px 0 0;
  background: var(--primary);
  margin-top: auto;
  cursor: pointer;
  transition: filter 0.2s;
  position: relative;
}
.chart-bar:hover { filter: brightness(1.15); }
.chart-bar .bar-tooltip {
  position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
  background: var(--text-primary); color: #fff;
  padding: 3px 7px; border-radius: 5px;
  font-size: 11px; white-space: nowrap;
  font-family: 'Segoe UI', sans-serif;
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.chart-bar:hover .bar-tooltip { opacity: 1; }
.chart-bar.secondary { background: var(--primary-bg); }
.chart-bar-label { font-size: 10px; color: var(--text-secondary); }

/* ===== PIE CHART ===== */
.donut-chart {
  width: 120px; height: 120px;
  border-radius: 50%;
  margin: 0 auto 12px;
  position: relative;
}
.donut-center {
  position: absolute; inset: 20px;
  background: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
}
.donut-center .donut-val { font-size: 18px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.donut-center .donut-sub { font-size: 10px; color: var(--text-secondary); }
.chart-legend { display: flex; flex-direction: column; gap: 6px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 1200px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
