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

:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --primary-dark: #1e3a8a;
  --primary-hover: #1d4ed8;
  --accent: #06b6d4;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

h1 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tagline {
  font-size: 0.78rem;
  opacity: 0.85;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar {
  width: 240px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.sidebar-header {
  padding: 1rem;
}

.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
}

.sidebar .icon-btn {
  background: var(--bg);
  color: var(--text-muted);
}

.sidebar .icon-btn:hover {
  background: var(--border);
  color: var(--text);
}

.main-content {
  margin-left: 240px;
  flex: 1;
  min-height: 100vh;
}

.tab-nav {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0;
  background: transparent;
  border: none;
  overflow-x: visible;
  position: static;
  scrollbar-width: auto;
}

.tab-nav::-webkit-scrollbar { display: block; }

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-align: left;
}

.tab-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.tab-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.tab-content {
  display: none;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.tab-content.active { display: block; }

/* Accounts Tab */
.account-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.account-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.account-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.account-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.account-details {
  flex: 1;
}

.account-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.account-balance {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.account-balance strong {
  color: var(--text);
  font-size: 1rem;
}

.account-actions {
  display: flex;
  gap: 0.5rem;
}

.account-card-type {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.accounts-grid {
  margin-bottom: 0.5rem;
}

.accounts-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.accounts-list-grid .account-item-compact {
  margin-bottom: 0;
  position: relative;
  padding-left: 0;
  overflow: hidden;
}

.accounts-list-grid .account-item-compact::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--border);
}

/* Hover effect untuk account cards */
.accounts-list-grid .account-item-compact {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.accounts-list-grid .account-item-compact:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(30, 64, 175, 0.12), 0 3px 6px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-light);
}

.accounts-list-grid .account-item-compact:hover::before {
  background: var(--primary-light);
  width: 5px;
}

.accounts-list-grid .account-item-compact:active {
  transform: translateY(-1px);
}

/* Page transition animations */
.tab-content {
  animation: fadeInSlide 0.3s ease-out;
}

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

/* Card hover effects */
.card {
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.08);
}

/* Button animations */
.btn {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

/* Nav button hover effects */
.nav-btn {
  transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  transform: translateX(4px);
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Action button animations */
.action-btn {
  transition: all 0.2s ease;
}

.action-btn:hover {
  transform: scale(1.1);
  background: var(--bg-hover);
}

.action-btn:active {
  transform: scale(0.95);
}

/* Icon button animations */
.icon-btn {
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--bg-hover);
  transform: rotate(90deg);
}

.icon-btn:active {
  transform: rotate(90deg) scale(0.9);
}

/* Modal animations */
.modal {
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Toast notifications animation */
.toast {
  animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Mobile hamburger menu */
.hamburger-menu {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
  transition: all 0.3s ease;
}

.hamburger-menu:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.hamburger-menu span {
  display: block;
  width: 24px;
  height: 3px;
  background: white;
  margin: 4px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
}

@media (max-width: 768px) {
  .hamburger-menu {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
  }

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

  .main-content {
    margin-left: 0;
    padding-top: 4rem;
  }

  .mobile-overlay.active {
    display: block;
  }
}

.accounts-add-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.accounts-add-buttons .btn {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}

.account-item-compact {
  padding: 0.75rem;
}

.accounts-section-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

.accounts-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.accounts-sub-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

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

.summary-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0.5rem;
}

.summary-card {
  background: var(--surface);
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.summary-card.card-balance {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
}

.summary-card.card-balance .summary-label {
  color: rgba(255, 255, 255, 0.85);
}

.summary-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.summary-value {
  display: block;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

#tab-loans .summary-label {
  font-size: 0.68rem;
}

#tab-loans .summary-value {
  font-size: 1.1rem;
}

.card-balance .summary-value { font-size: 1.85rem; }

.summary-meta {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.meta-income { color: #86efac; font-weight: 600; }
.meta-expense { color: #fca5a5; font-weight: 600; }
.meta-divider { opacity: 0.5; }

.card-income .summary-value { color: var(--success); }
.card-expense .summary-value { color: var(--danger); }

.card {
  background: var(--surface);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.75rem;
}

h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  margin-top: 1rem;
}

.sub-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover { text-decoration: underline; }

.select-compact {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.select-compact:focus {
  outline: none;
  border-color: var(--primary-light);
}

.chart-card { padding: 1rem 1.25rem; }

.chart-wrap {
  position: relative;
  height: 220px;
}

.chart-wrap-lg { height: 280px; }

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: linear-gradient(to bottom, var(--bg-subtle) 0%, transparent 100%);
  border-radius: var(--radius);
  margin: 1rem 0;
  border: 2px dashed var(--border);
  position: relative;
  overflow: hidden;
}

.empty-state::before {
  content: "📭";
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
  animation: float 3s ease-in-out infinite;
}

.empty-state:empty::before,
.empty-state:not(:empty)::before {
  content: "📭";
}

#chart-empty::before { content: "📊"; }
#recent-empty::before { content: "💸"; }
#no-data-msg::before { content: "🔍"; }
#loan-empty::before { content: "🏦"; }
#payslip-empty::before { content: "💰"; }
#recurring-empty::before { content: "🔄"; }
#budget-empty-msg::before { content: "📋"; }

.empty-state p {
  margin: 0;
  line-height: 1.5;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.budget-alert { margin-bottom: 1rem; }

.alert-container { display: flex; flex-direction: column; gap: 0.5rem; }

.alert-item {
  background: #fef3c7;
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.alert-item.alert-danger {
  background: #fee2e2;
  border-left-color: var(--danger);
}

.alert-icon { font-size: 1.15rem; }

.tx-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}

.tx-item:last-child { border-bottom: none; }

.tx-info { flex: 1; min-width: 0; }

.tx-category {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tx-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-amount {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}

.tx-amount.income { color: var(--success); }
.tx-amount.expense { color: var(--danger); }

.tx-actions {
  display: flex;
  gap: 0.25rem;
}

.action-btn {
  background: none;
  border: none;
  padding: 0.35rem;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all 0.15s;
}

.action-btn:hover {
  background: var(--bg);
  color: var(--primary);
}

.action-btn.delete:hover { color: var(--danger); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.form-group {
  margin-bottom: 0.9rem;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.hint-ai {
  font-weight: 400;
  color: var(--primary-light);
  font-size: 0.75rem;
  cursor: pointer;
}

input, select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.15rem;
}

.btn {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: var(--primary-hover); }

.btn-ghost {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover { background: var(--border); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-danger:hover { background: #fee2e2; }

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 0.75rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: var(--bg); }

.insight-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.insight-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border-left: 3px solid var(--primary-light);
}

.insight-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.recurring-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.recurring-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}

.recurring-item:last-child { border-bottom: none; }

.recurring-info { flex: 1; min-width: 0; }

.recurring-name {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.recurring-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.recurring-amount {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.recurring-status-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.recurring-stat-paid {
  border-left: 4px solid var(--success);
}

.recurring-stat-paid .summary-value {
  color: var(--success);
  font-size: 1.3rem;
}

.recurring-stat-outstanding {
  border-left: 4px solid var(--danger);
}

.recurring-stat-outstanding .summary-value {
  color: var(--danger);
  font-size: 1.3rem;
}

.check-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  padding: 0;
}

.check-btn svg {
  width: 16px;
  height: 16px;
  opacity: 0;
  transition: opacity 0.2s;
  stroke: white;
}

.check-btn:hover {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.08);
}

.check-btn:hover svg {
  opacity: 0.4;
  stroke: var(--success);
}

.check-btn.checked {
  background: var(--success);
  border-color: var(--success);
}

.check-btn.checked svg {
  opacity: 1;
}

.check-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.recurring-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.recurring-item.item-paid {
  opacity: 0.65;
  background: rgba(16, 185, 129, 0.04);
}

.recurring-item.item-paid strike {
  text-decoration: line-through;
  color: var(--text-muted);
}

.recurring-item.item-overdue {
  background: rgba(239, 68, 68, 0.06);
  border-left: 3px solid var(--danger);
  padding-left: calc(1.25rem - 3px);
}

.recurring-item.item-overdue .recurring-amount {
  color: var(--danger);
}

.status-paid {
  background: #d1fae5;
  color: #065f46;
}

.status-overdue {
  background: #fee2e2;
  color: #991b1b;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.paid-date {
  font-size: 0.72rem;
  color: var(--success);
  margin-left: 0.4rem;
}

.overdue-badge {
  display: inline-block;
  background: var(--danger);
  color: white;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.4rem;
  letter-spacing: 0.03em;
}

.recurring-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
}

.alert-overdue {
  background: #fee2e2;
  border-left: 4px solid var(--danger);
  color: #7f1d1d;
}

.alert-overdue .alert-text {
  flex: 1;
}

.alert-overdue .alert-sub {
  font-size: 0.78rem;
  margin-top: 0.25rem;
  color: #991b1b;
}

.alert-complete {
  background: #d1fae5;
  border-left: 4px solid var(--success);
  color: #065f46;
}

.alert-complete .alert-text {
  flex: 1;
}

.alert-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .recurring-status-bar {
    grid-template-columns: 1fr;
  }
  .recurring-alert {
    flex-wrap: wrap;
  }
  .recurring-alert .btn {
    width: 100%;
    margin-top: 0.5rem;
  }
}

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-active {
  background: #d1fae5;
  color: #065f46;
}

.status-paused {
  background: #e0e7ff;
  color: #3730a3;
}

.budget-total-bar {
  margin-bottom: 1.25rem;
}

.budget-item {
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.budget-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.budget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.budget-category { font-weight: 600; }

.budget-amounts {
  display: flex;
  gap: 0.25rem;
  font-size: 0.82rem;
}

.budget-spent { font-weight: 600; }
.budget-limit { color: var(--text-muted); }

.progress-bar {
  height: 8px;
  background: var(--bg);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 10px;
  background: var(--primary-light);
  transition: width 0.3s ease;
}

.progress-fill.warning { background: var(--warning); }
.progress-fill.danger { background: var(--danger); }

.budget-percent {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-align: right;
}

.comparison-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.comparison-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comparison-category { font-weight: 600; font-size: 0.88rem; }

.comparison-values {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.82rem;
}

.comparison-current { font-weight: 600; color: var(--danger); }
.comparison-prev { color: var(--text-muted); }

.comparison-change {
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}

.change-up {
  background: #fee2e2;
  color: #991b1b;
}

.change-down {
  background: #d1fae5;
  color: #065f46;
}

.top-categories {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.top-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-rank {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.top-info { flex: 1; min-width: 0; }

.top-category {
  font-weight: 600;
  font-size: 0.88rem;
}

.top-progress {
  margin-top: 0.35rem;
}

.top-amount {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.budget-setting-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.budget-setting-row label {
  flex: 1;
  margin-bottom: 0;
}

.budget-setting-row input { max-width: 140px; }

.toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-top: 0.25rem;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: 22px;
  position: relative;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.modal.active { display: flex; }

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  animation: slideUp 0.25s ease;
}

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

.modal-large { max-width: 560px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 { margin: 0; }

.modal-body { padding: 1.25rem 1.5rem; }

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.file-input {
  padding: 0.5rem;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
}

.file-input::-webkit-file-upload-button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  margin-right: 0.75rem;
  font-size: 0.82rem;
}

code {
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.78rem;
  color: var(--danger);
}

.toast-container {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  width: calc(100% - 2rem);
  max-width: 400px;
}

.toast {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
  animation: toastIn 0.3s ease;
  pointer-events: auto;
  font-weight: 500;
}

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

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(2px);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .app-header { padding: 1rem 1.15rem; }
  h1 { font-size: 1rem; }
  .tagline { font-size: 0.72rem; }
  .tab-content { padding: 0.85rem; }
  .summary-value { font-size: 1.3rem; }
  .card-balance .summary-value { font-size: 1.6rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .filter-bar { grid-template-columns: 1fr; }
  .summary-row { grid-template-columns: 1fr; }
  th, td { padding: 0.6rem; font-size: 0.82rem; }
  h2 { font-size: 0.95rem; }
  #tab-loans .loan-list { grid-template-columns: 1fr; }
  #tab-loans .loan-stats-grid { grid-template-columns: 1fr 1fr; }
}

.loan-stat-col {
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.loan-stat-expected {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  border-color: var(--primary-light);
  grid-column: 1 / -1;
  text-align: center;
  padding: 0.85rem;
}

.loan-stat-expected .loan-stat-label {
  color: var(--primary);
  font-weight: 700;
}

.loan-finish-date {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.15rem;
}

.loan-finish-done {
  color: var(--success);
}

.loan-finish-danger {
  color: var(--danger);
}

.loan-remain {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.progress-fill.done {
  background: var(--success);
}

.loan-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.loan-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.loan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}

#tab-loans .loan-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

#tab-loans .loan-card {
  margin-bottom: 0;
}

.loan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.loan-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.loan-icon {
  font-size: 1.25rem;
}

.loan-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.loan-type {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
}

.loan-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

#tab-loans .loan-stats-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.loan-stat-col {
  background: var(--bg);
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
}

.loan-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.loan-stat-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.loan-stat-full {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid var(--primary-light);
  text-align: center;
}

.loan-stat-expected .loan-stat-label {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.7rem;
}

.loan-finish-date {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}

.loan-finish-date.loan-finish-danger {
  color: var(--danger);
}

.loan-finish-date.loan-finish-done {
  color: var(--success);
}

.loan-remain {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.loan-progress {
  margin-top: 0.5rem;
}

.loan-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-fill.done {
  background: var(--success);
}

.loan-total-payable {
  margin-bottom: 0.75rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.9) 0%, rgba(6, 182, 212, 0.85) 100%);
  border-radius: 6px;
  color: #fff;
  border: 1px solid var(--primary-light);
}

.loan-total-payable-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}

.loan-total-payable-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.loan-total-payable-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.loan-total-payable-info {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.75);
}

.loan-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
}

.loan-expected {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.65rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
}

.loan-expected strong {
  color: var(--text);
}

.payslip-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.payslip-item {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.payslip-info { flex: 1; min-width: 0; }

.payslip-month-label {
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.payslip-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.payslip-salary {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--success);
}

.payslip-actions {
  display: flex;
  gap: 0.4rem;
}

.salary-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.salary-card-primary {
  grid-column: span 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
}

.salary-card-primary .summary-label {
  color: rgba(255, 255, 255, 0.85);
}

.salary-card-primary .summary-value {
  color: #fff;
}

.summary-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.salary-card-primary .summary-sub {
  color: rgba(255, 255, 255, 0.7);
}

.deduction-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
  align-items: center;
}

.deduction-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.deduction-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.deduction-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.deduction-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.deduction-name {
  font-weight: 500;
}

.deduction-amount {
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 640px) {
  .salary-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .deduction-grid {
    grid-template-columns: 1fr;
  }
}

/* ============= SPLIT PAYMENT STYLES ============= */
.payment-form {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.payment-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.payment-form .btn-full {
  width: 100%;
}

.payments-list {
  margin-top: 1.5rem;
}

.payments-list h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.payment-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.payment-item-info {
  flex: 1;
}

.payment-item-amount {
  font-weight: 700;
  color: var(--success);
  margin-right: 1rem;
  font-size: 1.1rem;
}

.payment-item-account {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.payment-item-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.payment-item-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.25rem;
}

.recurring-payment-summary {
  background: var(--bg);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

.recurring-payment-summary .summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.recurring-payment-summary .summary-label {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.recurring-payment-summary .summary-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.recurring-payment-summary .summary-value.paid {
  color: var(--success);
}

.recurring-payment-summary .summary-value.balance {
  color: var(--warning);
}

.recurring-payment-summary .summary-value.zero {
  color: var(--success);
}

/* ============= CALCULATOR STYLES ============= */
#tab-calculator .section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

#tab-calculator .calc-section {
  background: var(--bg);
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

#tab-calculator .calc-section h4 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

#tab-calculator .calc-result {
  background: var(--primary-dark);
  color: white;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
}

#tab-calculator .calc-result p {
  margin-bottom: 0.5rem;
}

#tab-calculator .calc-result strong {
  color: var(--warning);
  font-size: 1.3rem;
}

#tab-calculator .calc-result-small {
  background: var(--surface);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text);
}

.calculator-container {
  max-width: 320px;
  margin: 0 auto;
}

.calc-display {
  width: 100%;
  font-size: 2rem;
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: right;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: var(--text);
}

.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.calc-btn {
  padding: 1.25rem;
  font-size: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
  color: var(--text);
}

.calc-btn:hover {
  background: var(--bg);
  transform: translateY(-1px);
}

.calc-btn:active {
  transform: translateY(0);
}

.calc-btn.calc-zero {
  grid-column: span 2;
}

.calc-btn.calc-operator {
  background: var(--primary-light);
  color: white;
}

.calc-btn.calc-operator:hover {
  background: var(--primary);
}

.calc-btn.calc-clear {
  background: var(--danger);
  color: white;
}

.calc-btn.calc-clear:hover {
  background: #dc2626;
}

.calc-btn.calc-backspace {
  background: var(--warning);
  color: white;
}

.calc-btn.calc-backspace:hover {
  background: #d97706;
}

.calc-btn.calc-equals {
  background: var(--success);
  color: white;
  grid-column: span 1;
}

.calc-btn.calc-equals:hover {
  background: #059669;
}

/* ============= REPORTING STYLES ============= */
.report-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.form-control-inline {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control-inline:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding: 0 1.5rem;
}

.report-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 0 1.5rem;
}

.report-charts-grid .card {
  margin: 0;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.report-table thead {
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.report-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.report-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s ease;
}

.report-table tbody tr:hover {
  background-color: var(--bg-hover);
}

.report-table td {
  padding: 0.75rem 1rem;
  color: var(--text);
}

.report-table .empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.report-actions {
  display: flex;
  gap: 0.5rem;
}

.income {
  color: var(--success) !important;
}

.expense {
  color: var(--danger) !important;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem 0;
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  
  #tab-reporting, #tab-reporting * {
    visibility: visible;
  }
  
  #tab-reporting {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  
  .report-actions,
  .report-controls,
  .btn {
    display: none !important;
  }
  
  .card {
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }
  
  .report-table {
    page-break-inside: auto;
  }
  
  .report-table tr {
    page-break-inside: avoid;
  }
}

/* Mobile Responsive for Reporting */
@media (max-width: 768px) {
  .report-summary-grid {
    grid-template-columns: 1fr 1fr;
    padding: 0 1rem;
  }
  
  .report-charts-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  
  .report-controls {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  
  .form-control-inline {
    width: 100%;
  }
  
  .report-table {
    font-size: 0.75rem;
  }
  
  .report-table th,
  .report-table td {
    padding: 0.5rem 0.25rem;
  }
}

