/* ============================================================
   SiTagih — Premium UI Design System
   Modern SaaS-style, mobile-first
   ============================================================ */

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Brand */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #eff6ff;
  --primary-grad: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);

  /* Semantic */
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --info: #06b6d4;
  --info-light: #ecfeff;
  --purple: #8b5cf6;
  --purple-light: #f5f3ff;

  /* Neutrals */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Layout */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 8px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-primary: 0 4px 16px rgba(59, 130, 246, 0.35);

  /* Transition */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background-color: #f5f7fa;
  font-family:
    "Inter",
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 0.875rem;
  color: var(--gray-800);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
}

/* ── Top Navbar ───────────────────────────────────────────── */
.app-navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: var(--shadow-xs);
}

.app-navbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--gray-900);
  letter-spacing: -0.4px;
  text-decoration: none;
}

.brand-icon-wrap {
  width: 34px;
  height: 34px;
  background: var(--primary-grad);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: var(--shadow-primary);
  flex-shrink: 0;
}

.navbar-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border-radius: 30px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.navbar-user-pill:hover {
  background: var(--gray-200);
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: var(--primary-grad);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Offcanvas Sidebar ────────────────────────────────────── */
.app-sidebar {
  width: 288px !important;
}

.sidebar-header {
  background: var(--gray-900);
  padding: 20px 18px 16px;
}

.sidebar-user-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}
.sidebar-user-role {
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-top: 2px;
}

.sidebar-body {
  padding: 8px;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 12px 10px 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
  margin-bottom: 1px;
  text-decoration: none;
}

.sidebar-link:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.sidebar-link.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

.sidebar-link .nav-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.icon-primary {
  background: var(--primary-light);
  color: var(--primary);
}
.icon-success {
  background: var(--success-light);
  color: var(--success);
}
.icon-danger {
  background: var(--danger-light);
  color: var(--danger);
}
.icon-info {
  background: var(--info-light);
  color: var(--info);
}
.icon-warning {
  background: var(--warning-light);
  color: var(--warning);
}
.icon-purple {
  background: var(--purple-light);
  color: var(--purple);
}

/* ── Bottom Navigation ────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--gray-100);
  height: 68px;
  padding: 0 6px;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.07);
  display: flex;
  align-items: center;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--gray-400);
  font-size: 0.6rem;
  font-weight: 600;
  padding: 4px;
  border-radius: 10px;
  transition: var(--transition);
  gap: 3px;
  min-height: 52px;
  margin: 0 1px;
}

.bottom-nav-item i {
  font-size: 1.3rem;
  line-height: 1;
}
.bottom-nav-item.active {
  color: var(--primary);
}
.bottom-nav-item:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.bottom-nav-item.bottom-nav-main .bnav-plus {
  width: 44px;
  height: 44px;
  background: var(--primary-grad);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  box-shadow: var(--shadow-primary);
  margin-top: -10px;
  transition: var(--transition);
}

.bottom-nav-item.bottom-nav-main:hover .bnav-plus {
  transform: scale(1.08);
}

/* ── Login Page ───────────────────────────────────────────── */
.login-page {
  background: linear-gradient(160deg, #1e3a5f 0%, #0f2444 55%, #0a1628 100%);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.18) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.login-page::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.login-wrap {
  position: relative;
  z-index: 1;
}

.brand-logo {
  width: 64px;
  height: 64px;
  background: var(--primary-grad);
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.5);
  margin-bottom: 16px;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-xl);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.login-card-header {
  background: linear-gradient(180deg, #f9fafb 0%, #fff 100%);
  border-bottom: 1px solid var(--gray-100);
  padding: 26px 28px 20px;
  text-align: center;
}

.login-card-body {
  padding: 24px 28px 28px;
}

.login-field-wrap {
  position: relative;
}

.login-field-wrap .field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1rem;
  z-index: 2;
  pointer-events: none;
}

.login-field-wrap .form-control {
  padding-left: 40px !important;
  background: var(--gray-50);
  border-color: var(--gray-200);
  height: 50px;
  border-radius: 10px !important;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.login-field-wrap .form-control:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.login-field-wrap .toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  z-index: 2;
  transition: var(--transition);
}

.login-field-wrap .toggle-pwd:hover {
  color: var(--gray-600);
}

/* ── Greeting Hero ────────────────────────────────────────── */
.greeting-hero {
  background: var(--primary-grad);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-primary);
}

.greeting-hero::before {
  content: "";
  position: absolute;
  top: -35px;
  right: -35px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.greeting-hero::after {
  content: "";
  position: absolute;
  bottom: -45px;
  right: 25px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.greeting-name {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.greeting-date {
  font-size: 0.75rem;
  opacity: 0.75;
  margin-top: 2px;
}

.overdue-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 12px;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  transition: var(--transition);
}

.overdue-badge:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ── Stat Cards ───────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.stat-card-success .stat-icon-wrap {
  background: var(--success-light);
  color: var(--success);
}
.stat-card-danger .stat-icon-wrap {
  background: var(--danger-light);
  color: var(--danger);
}
.stat-card-primary .stat-icon-wrap {
  background: var(--primary-light);
  color: var(--primary);
}
.stat-card-warning .stat-icon-wrap {
  background: var(--warning-light);
  color: var(--warning);
}
.stat-card-info .stat-icon-wrap {
  background: var(--info-light);
  color: var(--info);
}
.stat-card-purple .stat-icon-wrap {
  background: var(--purple-light);
  color: var(--purple);
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.stat-glow {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.06;
}

.stat-card-success .stat-glow {
  background: var(--success);
}
.stat-card-danger .stat-glow {
  background: var(--danger);
}
.stat-card-primary .stat-glow {
  background: var(--primary);
}
.stat-card-warning .stat-glow {
  background: var(--warning);
}

/* ── Quick Actions ────────────────────────────────────────── */
.quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
  flex: 1;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.qa-primary {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.qa-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  color: #fff;
}

.qa-success {
  background: var(--success-light);
  color: var(--success);
}

.qa-success:hover {
  background: #d1fae5;
  color: #059669;
}

.qa-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.qa-danger:hover {
  background: #fee2e2;
  color: #dc2626;
}

.qa-secondary {
  background: var(--gray-100);
  color: var(--gray-600);
}

.qa-secondary:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

/* ── Section Card ─────────────────────────────────────────── */
.section-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  margin-bottom: 16px;
}

.section-card-header {
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-50);
}

.section-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* ── Item Cards (customer/payment row cards) ──────────────── */
.item-card {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-50);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.item-card:last-child {
  border-bottom: none;
}
.item-card:hover {
  background: var(--gray-50);
}

/* Customer list cards (standalone, rounded) */
.customer-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--gray-100);
  border-left: 3px solid var(--gray-200);
  padding: 14px 14px 12px;
  margin-bottom: 8px;
  transition: var(--transition);
}

.customer-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-200);
  transform: translateY(-1px);
}

.customer-card.border-paid {
  border-left-color: var(--success);
}
.customer-card.border-unpaid {
  border-left-color: var(--warning);
}
.customer-card.border-overdue {
  border-left-color: var(--danger);
}

.item-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* ── Filter Tabs ──────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  background: #fff;
  border: 1.5px solid var(--gray-200);
  color: var(--gray-500);
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-tab:hover {
  border-color: var(--gray-300);
  color: var(--gray-700);
}

.filter-tab.active.tab-all {
  background: var(--gray-800);
  border-color: var(--gray-800);
  color: #fff;
}
.filter-tab.active.tab-paid {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.filter-tab.active.tab-unpaid {
  background: var(--warning);
  border-color: var(--warning);
  color: #fff;
}
.filter-tab.active.tab-overdue {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

/* ── Status Badges ────────────────────────────────────────── */
.badge-paid {
  background: var(--success-light) !important;
  color: #065f46 !important;
  font-weight: 600;
  border-radius: 20px !important;
}
.badge-unpaid {
  background: var(--warning-light) !important;
  color: #92400e !important;
  font-weight: 600;
  border-radius: 20px !important;
}
.badge-overdue {
  background: var(--danger-light) !important;
  color: #991b1b !important;
  font-weight: 600;
  border-radius: 20px !important;
}
.badge-cash {
  background: var(--gray-100) !important;
  color: var(--gray-600) !important;
  font-weight: 600;
  border-radius: 20px !important;
}
.badge-transfer {
  background: var(--info-light) !important;
  color: #155e75 !important;
  font-weight: 600;
  border-radius: 20px !important;
}
.badge-admin {
  background: var(--warning-light) !important;
  color: #92400e !important;
  font-weight: 700;
  border-radius: 20px !important;
}
.badge-collector {
  background: var(--gray-100) !important;
  color: var(--gray-600) !important;
  font-weight: 600;
  border-radius: 20px !important;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  border-radius: var(--radius-sm) !important;
  font-weight: 600;
  font-size: 0.8125rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--primary-grad) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  color: #fff !important;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.45) !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none !important;
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  color: #fff !important;
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  border: none !important;
  color: #fff !important;
}

.btn-outline-secondary {
  border-color: var(--gray-200) !important;
  color: var(--gray-600) !important;
  background: #fff !important;
}

.btn-outline-secondary:hover {
  background: var(--gray-50) !important;
  border-color: var(--gray-300) !important;
  color: var(--gray-800) !important;
}

.btn-outline-success {
  border-color: var(--success) !important;
  color: var(--success) !important;
  background: #fff !important;
}

.btn-outline-success:hover {
  background: var(--success-light) !important;
  color: var(--success) !important;
}

.btn-outline-danger {
  border-color: var(--danger) !important;
  color: var(--danger) !important;
  background: #fff !important;
}

.btn-outline-danger:hover {
  background: var(--danger-light) !important;
  color: var(--danger) !important;
}

.btn-outline-warning {
  border-color: var(--warning) !important;
  color: var(--warning) !important;
  background: #fff !important;
}

.btn-lg {
  padding: 13px 24px !important;
  font-size: 0.9375rem !important;
  border-radius: 10px !important;
}

.btn-sm {
  padding: 5px 12px !important;
  font-size: 0.75rem !important;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-control,
.form-select {
  border-color: var(--gray-200);
  border-radius: var(--radius-sm) !important;
  background: var(--gray-50);
  color: var(--gray-900);
  font-size: 0.875rem;
  transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  color: var(--gray-900);
}

.form-control-lg {
  height: 50px !important;
  font-size: 0.9375rem !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
}

.form-select-lg {
  height: 50px !important;
  font-size: 0.9375rem !important;
  border-radius: 10px !important;
}

textarea.form-control {
  height: auto !important;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.input-group-text {
  background: var(--gray-50);
  border-color: var(--gray-200);
  color: var(--gray-400);
}

.form-text {
  font-size: 0.72rem;
  color: var(--gray-400);
}

/* ── Form Card (add/edit pages) ───────────────────────────── */
.form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  padding: 20px;
}

/* ── Generic Card ─────────────────────────────────────────── */
.card {
  border-radius: var(--radius-lg) !important;
  border-color: var(--gray-100) !important;
  box-shadow: var(--shadow-sm) !important;
}

.card-header {
  background: var(--gray-50) !important;
  border-bottom-color: var(--gray-100) !important;
  font-weight: 700;
}

/* ── Alert ────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius) !important;
  border: none !important;
  font-size: 0.8125rem;
  font-weight: 500;
}

.alert-success {
  background: var(--success-light) !important;
  color: #065f46 !important;
}
.alert-danger {
  background: var(--danger-light) !important;
  color: #991b1b !important;
}
.alert-warning {
  background: var(--warning-light) !important;
  color: #92400e !important;
}
.alert-info {
  background: var(--info-light) !important;
  color: #155e75 !important;
}

/* ── Tables ───────────────────────────────────────────────── */
.table {
  font-size: 0.8125rem;
  color: var(--gray-700);
  margin-bottom: 0;
}

.table thead th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  border-bottom: 1px solid var(--gray-100) !important;
  background: var(--gray-50);
  padding: 10px 14px;
}

.table tbody td {
  border-bottom: 1px solid var(--gray-50);
  padding: 11px 14px;
  vertical-align: middle;
}

.table tbody tr:hover td {
  background: var(--gray-50);
}

.table tfoot td {
  background: var(--gray-50);
  font-weight: 700;
  border-top: 2px solid var(--gray-100) !important;
  padding: 11px 14px;
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--gray-400);
  text-align: center;
}

.empty-state-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.empty-state p {
  font-size: 0.875rem;
  margin: 0 0 16px;
}

/* ── Page Header (back button + title) ───────────────────────*/
.page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-top: 2px;
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 0.95rem;
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
}

.back-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-900);
}

/* ── Dropdown ─────────────────────────────────────────────── */
.dropdown-menu {
  border-radius: var(--radius) !important;
  border: 1px solid var(--gray-100) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 6px !important;
  font-size: 0.8125rem;
}

.dropdown-item {
  border-radius: var(--radius-sm) !important;
  padding: 8px 12px !important;
  font-weight: 500;
  color: var(--gray-700) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--gray-50) !important;
  color: var(--gray-900) !important;
}
.dropdown-item.text-danger {
  color: var(--danger) !important;
}
.dropdown-item.text-danger:hover {
  background: var(--danger-light) !important;
}
.dropdown-divider {
  border-color: var(--gray-100) !important;
  margin: 4px 0 !important;
}

/* ── Summary Bar ──────────────────────────────────────────── */
.summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 600;
}

.summary-bar-income {
  background: var(--success-light);
}
.summary-bar-expense {
  background: var(--danger-light);
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .no-print,
  .bottom-nav,
  .app-navbar,
  .offcanvas,
  .btn,
  .dropdown,
  .alert-dismissible .btn-close,
  .page-header .back-btn {
    display: none !important;
  }

  body {
    background: #fff !important;
    font-size: 11pt;
    color: #000;
  }

  .section-card,
  .form-card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    break-inside: avoid;
  }

  .print-only {
    display: block !important;
  }
}

.print-only {
  display: none;
}

/* ── Desktop ──────────────────────────────────────────────── */
@media (min-width: 768px) {
  .bottom-nav {
    display: none !important;
  }
  body {
    padding-bottom: 0 !important;
  }
  .stat-value {
    font-size: 1.3rem;
  }
  .container-fluid {
    max-width: 900px;
    margin: 0 auto;
  }
}

/* ── Utility ──────────────────────────────────────────────── */
.text-tiny {
  font-size: 0.7rem;
}
.text-small {
  font-size: 0.75rem;
}
.text-muted {
  color: var(--gray-400) !important;
}
.fw-700 {
  font-weight: 700;
}
.fw-800 {
  font-weight: 800;
}
