/* ============================================================
   ProAcc - Main Stylesheet
   Bright, Modern, Professional UI
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Variables ──────────────────────────────────────── */
:root {
  --primary:       #4F46E5;
  --primary-light: #818CF8;
  --primary-dark:  #3730A3;
  --secondary:     #EC4899;
  --accent:        #F59E0B;
  --success:       #10B981;
  --warning:       #F59E0B;
  --danger:        #EF4444;
  --info:          #06B6D4;

  --bg:            #F0F4FF;
  --bg-card:       #FFFFFF;
  --bg-sidebar:    #1E1B4B;

  --text-primary:  #1E1B4B;
  --text-secondary:#64748B;
  --text-muted:    #94A3B8;
  --text-white:    #FFFFFF;

  --border:        #E2E8F0;
  --border-focus:  #4F46E5;

  --shadow-sm:     0 1px 3px rgba(79,70,229,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:        0 4px 16px rgba(79,70,229,.12), 0 2px 6px rgba(0,0,0,.07);
  --shadow-lg:     0 12px 40px rgba(79,70,229,.18), 0 4px 12px rgba(0,0,0,.08);

  --radius:        14px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --radius-full:   9999px;

  --font:          'Plus Jakarta Sans', sans-serif;
  --transition:    all .22s cubic-bezier(.4,0,.2,1);
  --sidebar-width: 260px;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: var(--font); }
ul { list-style: none; }

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 99px; }

/* ─── Auth Layout ────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 40%, #EC4899 100%);
  position: relative;
  overflow: hidden;
}
.auth-wrapper::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  top: -200px; right: -200px;
}
.auth-wrapper::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -150px; left: -100px;
}
.auth-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  color: #fff;
  position: relative;
  z-index: 1;
}
.auth-brand .logo-big {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.auth-brand .logo-big span { color: #FCD34D; }
.auth-brand p { font-size: 1.05rem; opacity: .85; max-width: 380px; line-height: 1.7; }
.auth-features { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .95rem;
  opacity: .9;
}
.auth-feature-item .feat-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.auth-box {
  width: 480px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 50px 48px;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}
.auth-box h2 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.auth-box .subtitle { color: var(--text-secondary); margin-bottom: 32px; font-size: .95rem; }

/* ─── App Layout ─────────────────────────────────────────── */
.app-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition);
  overflow: hidden;
}
.sidebar-logo {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo .logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.sidebar-logo .logo-text span { color: #FCD34D; }
.sidebar-logo .logo-sub { color: rgba(255,255,255,.45); font-size: .72rem; margin-top: 2px; letter-spacing: .5px; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-section-label {
  color: rgba(255,255,255,.35);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 14px 12px 6px;
}
.nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,.65);
  font-size: .88rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
}
.nav-item a:hover, .nav-item a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.nav-item a.active { background: var(--primary); color: #fff; }
.nav-item a .nav-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  flex-shrink: 0;
}
.nav-item a.active .nav-icon { background: rgba(255,255,255,.2); }
.nav-item a .nav-badge {
  margin-left: auto;
  background: var(--secondary);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,.75);
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-user:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-user .user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-user .user-info { min-width: 0; }
.sidebar-user .user-name { font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-role { font-size: .72rem; color: rgba(255,255,255,.4); }

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-muted); }
.breadcrumb span { color: var(--text-primary); font-weight: 600; }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.topbar-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.page-content { padding: 28px 32px; flex: 1; }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.card-body { padding: 24px; }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--bg); }

/* ─── Stat Cards ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.primary::before   { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.success::before   { background: linear-gradient(90deg, var(--success), #34D399); }
.stat-card.warning::before   { background: linear-gradient(90deg, var(--warning), #FCD34D); }
.stat-card.danger::before    { background: linear-gradient(90deg, var(--danger), #F87171); }
.stat-card.info::before      { background: linear-gradient(90deg, var(--info), #67E8F9); }

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-card.primary .stat-icon   { background: #EEF2FF; color: var(--primary); }
.stat-card.success .stat-icon   { background: #ECFDF5; color: var(--success); }
.stat-card.warning .stat-icon   { background: #FFFBEB; color: var(--warning); }
.stat-card.danger .stat-icon    { background: #FEF2F2; color: var(--danger); }
.stat-card.info .stat-icon      { background: #ECFEFF; color: var(--info); }
.stat-info { min-width: 0; }
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.stat-value { font-size: 1.45rem; font-weight: 800; color: var(--text-primary); line-height: 1.2; }
.stat-sub { font-size: .78rem; color: var(--text-secondary); margin-top: 4px; }

/* ─── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.form-label .req { color: var(--danger); margin-left: 3px; }
.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-primary);
  font-size: .9rem;
  font-weight: 500;
  transition: var(--transition);
  outline: none;
  appearance: none;
}
.form-control:focus {
  border-color: var(--border-focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.form-control::placeholder { color: var(--text-muted); font-weight: 400; }
.form-control.error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.form-error { font-size: .8rem; color: var(--danger); margin-top: 6px; font-weight: 500; }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: 5px; }

.input-group, .input-icon-wrap { position: relative; display: block; }
.input-group .form-control, .input-icon-wrap .form-control { padding-left: 44px; }
.input-group input[type="password"], .input-icon-wrap input[type="password"] { padding-right: 44px; }
.input-group .input-icon, .input-icon-wrap .input-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.input-group .input-icon-right, .input-icon-wrap .input-icon-right {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  background: none; border: none; outline: none;
  padding: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
  cursor: pointer;
}

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

textarea.form-control { resize: vertical; min-height: 90px; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  outline: none;
  user-select: none;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(79,70,229,.4); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #059669; border-color: #059669; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(16,185,129,.4); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #DC2626; border-color: #DC2626; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover { background: #D97706; color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: var(--bg);
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--border); color: var(--text-primary); }
.btn-sm { padding: 7px 16px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 12px; }
.btn-full { width: 100%; }
.btn-icon { padding: 10px; border-radius: var(--radius-sm); }

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .3px;
}
.badge-success { background: #ECFDF5; color: #059669; }
.badge-danger  { background: #FEF2F2; color: #DC2626; }
.badge-warning { background: #FFFBEB; color: #D97706; }
.badge-primary { background: #EEF2FF; color: var(--primary); }
.badge-info    { background: #ECFEFF; color: #0891B2; }
.badge-gray    { background: #F1F5F9; color: var(--text-secondary); }

/* ─── Tables ─────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #F8FAFF; }
tbody td { padding: 14px 16px; color: var(--text-primary); vertical-align: middle; }
.text-right { text-align: right; }
.text-center { text-align: center; }

.amount-income { color: var(--success); font-weight: 700; }
.amount-expense { color: var(--danger); font-weight: 700; }

/* ─── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: .9rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid transparent;
  animation: slideDown .3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.alert-success { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.alert-error   { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.alert-warning { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.alert-info    { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }

/* ─── Progress Bar ───────────────────────────────────────── */
.progress-wrap { width: 100%; }
.progress-bar-bg {
  background: var(--border);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .6s ease;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ─── Project Cards ──────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.project-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.project-card-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.project-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.project-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; line-height: 1.3; }
.project-desc { font-size: .8rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card-body { padding: 16px 20px; flex: 1; }
.project-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.project-stat { text-align: center; }
.project-stat .lbl { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.project-stat .val { font-size: .95rem; font-weight: 700; color: var(--text-primary); }
.project-stat .val.inc { color: var(--success); }
.project-stat .val.exp { color: var(--danger); }
.project-card-footer { padding: 14px 20px; background: var(--bg); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }

/* ─── Empty State ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.empty-state .empty-icon { font-size: 4rem; margin-bottom: 16px; opacity: .6; }
.empty-state h3 { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.empty-state p { font-size: .9rem; color: var(--text-secondary); max-width: 340px; margin: 0 auto 24px; }

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn .25s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.modal-close {
  background: var(--bg);
  border: none;
  cursor: pointer;
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.modal-close:hover { background: #FEE2E2; color: var(--danger); }
.modal-body { padding: 24px 28px; }
.modal-footer { padding: 20px 28px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; }

/* ─── Filter Bar ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-bar .form-control { max-width: 200px; padding: 9px 16px; }
.filter-bar .search-input { max-width: 280px; }

/* ─── Chart Placeholder ──────────────────────────────────── */
.chart-wrap { position: relative; width: 100%; }

/* ─── Chip Tabs ──────────────────────────────────────────── */
.chip-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-tab {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: var(--transition);
}
.chip-tab.active, .chip-tab:hover { border-color: var(--primary); background: var(--primary); color: #fff; }
.chip-tab.income.active  { border-color: var(--success); background: var(--success); }
.chip-tab.expense.active { border-color: var(--danger); background: var(--danger); }

/* ─── Summary Row ────────────────────────────────────────── */
.summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.summary-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid var(--border);
  text-align: center;
  transition: var(--transition);
}
.summary-item:hover { box-shadow: var(--shadow); }
.summary-item .s-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; }
.summary-item .s-value { font-size: 1.25rem; font-weight: 800; }
.summary-item.budget  .s-value { color: var(--primary); }
.summary-item.income  .s-value { color: var(--success); }
.summary-item.expense .s-value { color: var(--danger); }
.summary-item.balance .s-value { color: var(--info); }

/* ─── Responsive ─────────────────────────────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-primary);
  padding: 4px;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}

@media (max-width: 1024px) {
  .form-row { grid-template-columns: 1fr; }
  .form-row.three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .auth-brand { display: none; }
  .auth-box { width: 100%; padding: 40px 28px; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .hamburger { display: flex; }
  .main-content { margin-left: 0; }
  .page-content { padding: 20px 16px; }
  .topbar { padding: 0 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .projects-grid { grid-template-columns: 1fr; }
  .summary-row { grid-template-columns: 1fr; }
  .form-row.three { grid-template-columns: 1fr; }
  .filter-bar { gap: 8px; }
  .filter-bar .form-control { max-width: 100%; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .modal { border-radius: var(--radius); }
}

/* ─── Utility ────────────────────────────────────────────── */
.d-flex  { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.mt-0    { margin-top: 0; }
.mb-0    { margin-bottom: 0; }
.mb-4    { margin-bottom: 4px; }
.mb-8    { margin-bottom: 8px; }
.mb-16   { margin-bottom: 16px; }
.mb-24   { margin-bottom: 24px; }
.mb-28   { margin-bottom: 28px; }
.text-muted { color: var(--text-muted); font-size: .85rem; }
.text-sm { font-size: .85rem; }
.fw-600  { font-weight: 600; }
.fw-700  { font-weight: 700; }
.w-full  { width: 100%; }

/* ─── Loading Spinner ────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Tooltip ────────────────────────────────────────────── */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  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: .75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
[data-tip]:hover::after { opacity: 1; }

/* ─── Delete Confirm Animation ───────────────────────────── */
.danger-zone {
  border: 2px dashed #FECACA;
  border-radius: var(--radius-sm);
  padding: 16px;
  background: #FFF5F5;
  margin-top: 20px;
}
.danger-zone p { color: #B91C1C; font-size: .85rem; margin-bottom: 12px; }

/* ─── Transaction type indicator ────────────────────────── */
.type-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  flex-shrink: 0;
}
.type-dot.income  { background: var(--success); }
.type-dot.expense { background: var(--danger); }

/* ─── Print & Formal Report Stylesheet ───────────────────── */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 15mm 12mm 15mm;
  }
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  body {
    background: #fff !important;
    color: #0f172a !important;
    font-family: 'Plus Jakarta Sans', Arial, Helvetica, sans-serif !important;
    font-size: 9pt !important;
    line-height: 1.35 !important;
  }
  .sidebar, .topbar, .sidebar-overlay, .btn, .btn-no-print, .no-print, nav {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
  }
  .page-content {
    padding: 0 !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
    background: transparent !important;
  }
  .card-header, .card-footer {
    background: transparent !important;
    border: none !important;
    padding: 4px 0 !important;
    margin-bottom: 4px !important;
  }
  .card-title {
    font-size: 9.5pt !important;
    font-weight: 700 !important;
    color: #0f172a !important;
  }
  .card-body {
    padding: 0 !important;
  }
  .print-only {
    display: block !important;
  }
  .table-wrapper {
    overflow: visible !important;
    border: none !important;
  }
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 10px !important;
    page-break-inside: auto;
  }
  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
  th, td {
    border: 1px solid #475569 !important;
    padding: 4.5px 7px !important;
    font-size: 8.5pt !important;
    color: #0f172a !important;
    vertical-align: middle;
  }
  th {
    background: #e2e8f0 !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 7.8pt !important;
    letter-spacing: 0.3px;
  }
  tfoot tr {
    background: #f1f5f9 !important;
    font-weight: 800 !important;
  }
  .report-meta-table {
    border: 1.5px solid #1e293b !important;
    margin-bottom: 12px !important;
  }
  .report-meta-table td {
    border: 1px solid #cbd5e1 !important;
    padding: 4px 8px !important;
    font-size: 8.5pt !important;
  }
  .kop-surat {
    display: flex !important;
    align-items: center;
    gap: 14px;
    border-bottom: 2.5px solid #0f172a;
    padding-bottom: 10px;
    margin-bottom: 12px;
  }
  .signature-area {
    display: flex !important;
    justify-content: space-between;
    margin-top: 24px;
    page-break-inside: avoid;
  }
}
@media screen {
  .print-only {
    display: none !important;
  }
}

/* ─── Support Donation Button ────────────────────────────── */
.btn-support {
  background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
  color: #ffffff !important;
  border: none;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.35);
  transition: all 0.2s ease;
  vertical-align: middle;
  text-decoration: none;
}
.btn-support:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.5);
  filter: brightness(1.05);
}
.sidebar-support-pill {
  background: linear-gradient(135deg, #EC4899, #8B5CF6);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.3);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
}
.sidebar-support-pill:hover {
  transform: scale(1.06);
  box-shadow: 0 3px 10px rgba(236, 72, 153, 0.5);
}

