@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #0D9488;
  --primary-dark: #0F766E;
  --primary-deeper: #115E59;
  --primary-light: #CCFBF1;
  --primary-ultra-light: #F0FDFA;
  --primary-glow: rgba(13, 148, 136, 0.18);
  --accent: #6366F1;
  --accent-light: #EEF2FF;
  --success: #10B981;
  --success-light: #D1FAE5;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --info: #0EA5E9;
  --info-light: #E0F2FE;
  --orange: #F97316;
  --orange-light: #FFEDD5;
  --bg: #F0FDFB;
  --bg-white: #FFFFFF;
  --sidebar-bg: #FFFFFF;
  --sidebar-hover: #F0FDFA;
  --sidebar-active: #CCFBF1;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --radius: 20px;
  --radius-sm: 16px;
  --radius-xs: 12px;
  --radius-pill: 999px;
  --shadow-xs: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 8px 32px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.14);
  --transition: all 0.18s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ==================== LOGIN PAGE ==================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #042F2E 0%, #065F46 45%, #0D9488 100%);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
  padding: 44px;
  animation: slideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--text);
}

.login-logo .logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deeper));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 19px;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 36px;
}

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.2px;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #FAFBFC;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deeper));
  border: none;
  border-radius: var(--radius-xs);
  color: white;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.login-error {
  color: var(--danger);
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
  display: none;
}

/* ==================== DASHBOARD LAYOUT ==================== */
.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 256px;
  background: var(--sidebar-bg);
  border-right: 1.5px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 20px 18px;
  font-size: 19px;
  font-weight: 900;
  color: var(--text);
  border-bottom: 1.5px solid var(--border-light);
  letter-spacing: -0.3px;
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deeper));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 15px;
  box-shadow: 0 3px 10px var(--primary-glow);
  flex-shrink: 0;
}

.sidebar-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  margin-left: auto;
  letter-spacing: 0.3px;
}

.sidebar-badge.client {
  background: var(--primary-ultra-light);
  color: var(--primary-deeper);
  border: 1px solid var(--primary-light);
}

.sidebar-nav {
  padding: 14px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-section { margin-bottom: 6px; }

.nav-section-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 12px 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover { background: var(--sidebar-hover); color: var(--text); }

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--primary-dark);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  font-size: 17px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-user {
  padding: 14px 16px;
  border-top: 1.5px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #14B8A6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { color: var(--text); font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: var(--text-muted); font-size: 11px; margin-top: 1px; }

.logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 17px;
  padding: 6px;
  border-radius: 8px;
  transition: var(--transition);
  flex-shrink: 0;
}

.logout-btn:hover {
  color: var(--danger);
  background: var(--danger-light);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
  margin-left: 256px;
  flex: 1;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==================== TOP TOOLBAR ==================== */
.top-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(240, 253, 251, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 28px;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu-btn { display: none; }

.toolbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 7px 12px;
  min-width: 240px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.toolbar-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.toolbar-search input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 13px;
  color: var(--text);
  background: transparent;
  font-family: 'Inter', sans-serif;
}

.toolbar-search input::placeholder { color: var(--text-muted); }

/* ==================== PAGE WRAPPER ==================== */
.page {
  padding: 28px 32px;
  flex: 1;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.6px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 3px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ==================== STAT CARDS ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 22px 20px 18px;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 20px 20px 0 0;
}

.stat-card.green::before { background: linear-gradient(90deg, var(--primary), #14B8A6); }
.stat-card.blue::before { background: linear-gradient(90deg, var(--accent), #818CF8); }
.stat-card.purple::before { background: linear-gradient(90deg, #8B5CF6, #C084FC); }
.stat-card.orange::before { background: linear-gradient(90deg, var(--warning), var(--orange)); }

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.4;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-card.green .stat-icon { background: var(--primary-ultra-light); }
.stat-card.blue .stat-icon { background: #EEF2FF; }
.stat-card.purple .stat-icon { background: #F5F3FF; }
.stat-card.orange .stat-icon { background: var(--orange-light); }

.stat-value {
  font-size: 30px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -1.5px;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-change {
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.stat-change.positive { color: var(--primary-dark); background: var(--primary-ultra-light); border-color: var(--primary-light); }
.stat-change.negative { color: var(--danger); background: var(--danger-light); border-color: #FECACA; }

/* ==================== BALANCE CARD ==================== */
.balance-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-deeper));
  border-radius: var(--radius-sm);
  padding: 26px 28px;
  color: white;
  margin-bottom: 24px;
  box-shadow: 0 6px 24px var(--primary-glow);
  position: relative;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.balance-card::after {
  content: '';
  position: absolute;
  bottom: -20px; left: 40px;
  width: 100px; height: 100px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.balance-header { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.balance-label { font-size: 13px; font-weight: 500; opacity: 0.85; letter-spacing: 0.2px; }
.balance-value { font-size: 40px; font-weight: 900; letter-spacing: -2px; margin-top: 6px; }
.balance-icon { font-size: 44px; opacity: 0.55; }

.balance-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12.5px;
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

/* ==================== CARDS ==================== */
.card {
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border-light);
  overflow: hidden;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1.5px solid var(--border-light);
  background: white;
  gap: 12px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card-body { padding: 0; }

/* ==================== TABLES ==================== */
table { width: 100%; border-collapse: collapse; }

thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: #FAFBFD;
  border-bottom: 1.5px solid var(--border-light);
  white-space: nowrap;
}

tbody td {
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--text);
  border-bottom: 1.5px solid var(--border-light);
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: #F0FDFA; }

/* ==================== BADGES ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.badge.success, .badge.online, .badge.confirmed, .badge.completed, .badge.active {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.badge.warning, .badge.pending, .badge.paid {
  background: var(--warning-light);
  color: #92400E;
  border: 1px solid #FDE68A;
}

.badge.danger, .badge.offline, .badge.failed {
  background: var(--danger-light);
  color: #991B1B;
  border: 1px solid #FECACA;
}

.badge.info {
  background: var(--info-light);
  color: #0C4A6E;
  border: 1px solid #BAE6FD;
}

.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.badge.success::before, .badge.online::before, .badge.confirmed::before, .badge.completed::before, .badge.active::before { background: #10B981; }
.badge.warning::before, .badge.pending::before, .badge.paid::before { background: var(--warning); }
.badge.danger::before, .badge.offline::before, .badge.failed::before { background: var(--danger); }
.badge.info::before { background: var(--info); }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-deeper));
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-secondary {
  background: white;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: #F8FAFC;
  color: var(--text);
  border-color: #CBD5E1;
}

.btn-danger {
  background: var(--danger-light);
  color: #991B1B;
  border: 1.5px solid #FECACA;
}

.btn-danger:hover {
  background: #FECACA;
  transform: translateY(-1px);
}

.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 9px; }

/* ==================== FORMS ==================== */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

select.form-input {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ==================== FILTERS ==================== */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  align-items: center;
}

.filters .form-input {
  max-width: 200px;
  padding: 8px 12px;
  font-size: 13px;
  background: white;
  border-radius: var(--radius-xs);
}

.range-toggle {
  display: inline-flex;
  gap: 4px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 3px;
}

.range-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--text-secondary) !important;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
}

.range-btn:hover {
  color: var(--text) !important;
  background: var(--bg) !important;
}

.range-btn.active {
  background: var(--primary) !important;
  color: white !important;
  box-shadow: 0 2px 6px var(--primary-glow) !important;
}

.chart-metric-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--text-secondary) !important;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
}

.chart-metric-btn:hover {
  color: var(--text) !important;
  background: var(--bg) !important;
}

.chart-metric-btn.active {
  background: var(--primary) !important;
  color: white !important;
  box-shadow: 0 2px 6px var(--primary-glow) !important;
}

/* ==================== CHART ==================== */
.chart-area {
  width: 100%;
  min-height: 220px;
  padding: 16px;
}

.chart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 10px;
  font-size: 14px;
}

/* ==================== PAGINATION ==================== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 4px; padding: 16px; }

.page-btn {
  padding: 6px 12px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}

.page-btn:hover { background: var(--bg); color: var(--text); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 2px 8px var(--primary-glow); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==================== RECEIPT LINK ==================== */
.receipt-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--danger-light);
  color: #991B1B;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #FECACA;
  transition: var(--transition);
}

.receipt-link:hover {
  background: #FECACA;
  transform: translateY(-1px);
}

/* ==================== EMPTY STATE ==================== */
.empty-state { text-align: center; padding: 52px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 44px; margin-bottom: 12px; opacity: 0.7; }
.empty-state .desc { font-size: 13.5px; }

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1E293B;
  color: white;
  padding: 13px 18px;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: toastSlide 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 340px;
}

@keyframes toastSlide {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left: 4px solid #10B981; }
.toast.error { border-left: 4px solid var(--danger); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
  .page { padding: 24px; }
}

@media (max-width: 1024px) {
  .main-content { margin-left: 0; }
  .top-toolbar { padding: 10px 16px; }
  .toolbar-search { min-width: 0; flex: 1; }
}

@media (max-width: 768px) {
  .dashboard { display: flex; }

  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 272px;
    transform: translateX(-100%);
    z-index: 400;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    border-right: none;
  }

  body.sidebar-open .sidebar { transform: translateX(0); }

  .sidebar-logo { padding: 16px 18px; }

  .sidebar-nav {
    padding: 10px 10px 12px;
    overflow-x: hidden;
    white-space: normal;
  }

  .nav-section {
    display: block;
    margin-right: 0;
    min-width: 0;
  }

  .nav-section-title { padding: 8px 10px 5px; }
  .nav-item { padding: 10px 12px; margin-bottom: 3px; }
  .sidebar-user { display: flex; }

  .main-content { margin-left: 0; }

  .top-toolbar { padding: 10px 14px; gap: 8px; }

  .mobile-menu-btn { display: inline-flex; }

  .mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 350;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.sidebar-open .mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .page { padding: 16px 14px; }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-value { font-size: 24px; }

  .filters { gap: 8px; }

  .filters .form-input,
  .filters .btn {
    width: 100%;
    max-width: 100%;
  }

  .card-body { overflow-x: auto; }
  table { min-width: 700px; }
  tbody td { white-space: nowrap; }

  .chart-area { min-height: 180px; }

  .toolbar-search { min-width: 120px; }

  .balance-value { font-size: 32px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}
