/* ==========================================================================
   CASSA — Enterprise Financial & Cashflow Management UI
   ========================================================================== */

:root {
  --bg: #f4f7fb;
  --bg-elevated: #ffffff;
  --panel: #ffffff;
  --panel-alt: #f8fafc;
  --sidebar-bg: #0b1120;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: linear-gradient(135deg, #4f46e5, #2563eb);
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-border: rgba(255, 255, 255, 0.08);

  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: rgba(79, 70, 229, 0.1);

  --green: #059669;
  --green-soft: #ecfdf5;
  --green-border: #a7f3d0;

  --red: #e11d48;
  --red-soft: #fff1f2;
  --red-border: #fecdd3;

  --amber: #d97706;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;

  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --blue-border: #bfdbfe;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 45px -10px rgba(15, 23, 42, 0.18);
}

[data-theme="dark"] {
  --bg: #090d16;
  --bg-elevated: #111827;
  --panel: #111827;
  --panel-alt: #1e293b;
  --sidebar-bg: #060911;

  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;
  --border: #1e293b;
  --border-strong: #334155;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-soft: rgba(99, 102, 241, 0.16);

  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.14);
  --green-border: rgba(16, 185, 129, 0.3);

  --red: #f43f5e;
  --red-soft: rgba(244, 63, 94, 0.14);
  --red-border: rgba(244, 63, 94, 0.3);

  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --amber-border: rgba(245, 158, 11, 0.3);

  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.14);
  --blue-border: rgba(59, 130, 246, 0.3);

  --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

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

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   AUTH / LOGIN LAYOUT
   ========================================================================== */

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--bg);
}

.auth-aside {
  position: relative;
  background: radial-gradient(circle at 15% 20%, #312e81 0%, #0f172a 55%, #020617 100%);
  color: #ffffff;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.auth-aside-overlay {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(99, 102, 241, 0.18) 1px, transparent 1px),
    radial-gradient(rgba(56, 189, 248, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
  pointer-events: none;
}

.auth-aside-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  max-width: 540px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #2563eb);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
  flex-shrink: 0;
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.brand-name {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.8px;
  line-height: 1.1;
}

.brand-tag {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.8px;
  color: #818cf8;
  margin-top: 2px;
}

.auth-hero {
  margin: auto 0;
  padding: 36px 0;
}

.auth-hero h1 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin-bottom: 16px;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-hero p {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.65;
  margin-bottom: 32px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 16px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-feature strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #f8fafc;
}

.auth-feature span {
  display: block;
  font-size: 12.5px;
  color: #94a3b8;
  margin-top: 2px;
}

.auth-footer {
  font-size: 12px;
  color: #64748b;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--bg);
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: 20px;
  width: 100%;
  max-width: 430px;
  box-shadow: var(--shadow-lg);
}

.login-logo-mobile {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 18px;
}

.login-header {
  margin-bottom: 24px;
}

.login-header h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
}

.login-header p {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 4px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--panel-alt);
  padding: 5px;
  border-radius: 11px;
  border: 1px solid var(--border);
  margin-bottom: 22px;
}

.tab-btn {
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.18s ease;
}

.tab-btn.active {
  background: var(--panel);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  color: var(--text-secondary);
  border-radius: 10px;
  font-size: 12.5px;
  margin-bottom: 16px;
  line-height: 1.45;
}

.info-banner svg {
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */

.form-group,
.auth-form label,
.modal form label {
  display: block;
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

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

.input-icon-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.input-icon-wrap input {
  padding-left: 36px;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-elevated);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.hint {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 5px;
}

.form-error {
  color: var(--red);
  font-size: 12.5px;
  font-weight: 500;
  min-height: 18px;
  margin-top: 8px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--panel-alt);
  border-color: var(--border-strong);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn.primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.btn.danger {
  color: var(--red);
  border-color: var(--red-border);
  background: var(--red-soft);
}

.btn.danger:hover {
  filter: brightness(0.96);
}

.btn.small {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.btn.lg {
  padding: 11px 18px;
  font-size: 14px;
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn.ghost:hover {
  background: var(--panel-alt);
  color: var(--text);
}

.btn.full {
  width: 100%;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

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

/* ==========================================================================
   APP SHELL (SIDEBAR + MAIN AREA)
   ========================================================================== */

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-border);
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  z-index: 30;
}

.sidebar-header {
  padding: 4px 8px 20px;
  border-bottom: 1px solid var(--sidebar-border);
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: #ffffff;
  line-height: 1.1;
}

.brand-subtitle {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

.sidebar-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #475569;
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: none;
  background: transparent;
  border-radius: 11px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--sidebar-text);
  transition: all 0.16s ease;
  text-align: left;
}

.nav-btn:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}

.nav-btn.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.sidebar-footer {
  border-top: 1px solid var(--sidebar-border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.db-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 600;
  color: #34d399;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--sidebar-border);
  border-radius: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-meta {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: #94a3b8;
}

.user-card .icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  width: 32px;
  height: 32px;
}

.user-card .icon-btn:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

/* ==========================================================================
   MAIN CONTENT AREA & TOPBAR
   ========================================================================== */

.main-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--panel);
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.page-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-chip {
  padding: 7px 12px;
  border-radius: 9px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
}

.content {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 32px;
}

/* ==========================================================================
   KPI CARDS & DASHBOARD GRID
   ========================================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.card:hover {
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.card.green .card-icon {
  background: var(--green-soft);
  color: var(--green);
}

.card.red .card-icon {
  background: var(--red-soft);
  color: var(--red);
}

.card.amber .card-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.card.blue .card-icon {
  background: var(--blue-soft);
  color: var(--blue);
}

.card .value {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.card .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 500;
}

.card.green .value { color: var(--green); }
.card.red .value { color: var(--red); }
.card.amber .value { color: var(--amber); }
.card.blue .value { color: var(--blue); }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
  align-items: start;
}

/* ==========================================================================
   PANELS & TABLES
   ========================================================================== */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.panel h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.panel-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chart-container {
  width: 100%;
  overflow-x: auto;
}

.chart-container canvas {
  width: 100%;
  height: auto;
  display: block;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.table th {
  text-align: left;
  padding: 11px 14px;
  color: var(--muted);
  background: var(--panel-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table th:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  border-left: 1px solid var(--border);
}

.table th:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  border-right: 1px solid var(--border);
}

.table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.table tbody tr:hover td {
  background: var(--panel-alt);
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: capitalize;
}

.badge.gelir {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.badge.gider {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.badge.muted {
  background: var(--panel-alt);
  color: var(--muted);
  border: 1px solid var(--border);
}

.money-plus {
  color: var(--green);
  font-weight: 700;
}

.money-minus {
  color: var(--red);
  font-weight: 700;
}

/* ==========================================================================
   FILTERS BAR
   ========================================================================== */

.filters-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 16px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-item.grow {
  flex: 1;
  min-width: 180px;
}

.filter-item label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}

.filter-item input,
.filter-item select {
  margin-top: 0;
  padding: 8px 11px;
  font-size: 13px;
}

.filter-actions {
  display: flex;
  gap: 6px;
}

.tx-filter-summary {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 12px;
  padding: 0 4px;
}

.tx-filter-summary strong {
  color: var(--text);
}

/* ==========================================================================
   CHART LEGEND
   ========================================================================== */

.legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: middle;
}

.dot.income { background: var(--green); }
.dot.expense { background: var(--red); }
.dot.net { background: var(--blue); }

/* ==========================================================================
   MODALS & TOAST
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  width: 480px;
  max-width: 100%;
  max-height: 92vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.commission-card {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.commission-preview {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
}

.commission-preview b {
  color: var(--text);
  font-weight: 700;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--green);
}

.toast.error {
  background: #881337;
  border-left-color: #fb7185;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1120px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-aside {
    display: none;
  }
  .login-logo-mobile {
    display: flex;
  }
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: -270px;
    top: 0;
    bottom: 0;
    width: 260px;
    transition: left 0.22s ease;
  }
  .sidebar.open {
    left: 0;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .topbar {
    padding: 14px 18px;
  }
  .content {
    padding: 20px 16px;
  }
}

@media (max-width: 600px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .date-chip {
    display: none;
  }
}
