/* ==========================================================================
   Naga AI Assistant (Saranya) — Modern Responsive Stylesheet
   Executive Light Theme with Indigo Accents & Tamil Typography Support
   ========================================================================== */

:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-tamil: 'Noto Sans Tamil', 'Plus Jakarta Sans', sans-serif;

  /* Colors */
  --bg-app: #F8FAFC;
  --bg-sidebar: #0F172A;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #F1F5F9;

  --border-color: #E2E8F0;
  --border-focus: #6366F1;

  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-inverse: #FFFFFF;

  /* Accent Colors */
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #EEF2FF;

  --emerald: #10B981;
  --emerald-light: #ECFDF5;
  --emerald-border: #A7F3D0;

  --rose: #EF4444;
  --rose-light: #FEF2F2;
  --rose-border: #FECACA;

  --amber: #F59E0B;
  --amber-light: #FFFBEB;
  --amber-border: #FDE68A;

  --indigo: #6366F1;
  --indigo-light: #EEF2FF;
  --indigo-border: #C7D2FE;

  /* Elevation */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.tamil-text {
  font-family: var(--font-tamil);
  line-height: 1.6;
}

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

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: var(--transition);
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #6366F1, #4F46E5);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.brand-text h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-light);
}

.nav-menu {
  flex: 1;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.nav-item.active {
  background-color: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.nav-badge {
  margin-left: auto;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.nav-badge.alert {
  background-color: var(--rose);
}

.sidebar-status {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(0, 0, 0, 0.2);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.status-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-indicator strong {
  font-size: 0.85rem;
  display: block;
}

.status-indicator p {
  font-size: 0.7rem;
  color: var(--text-light);
}

.system-tag-badge {
  font-size: 0.7rem;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  color: #A5B4FC;
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 40;
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background-color: #E2E8F0;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-main);
  cursor: pointer;
}

.btn-sm:hover {
  background: var(--bg-card-subtle);
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-refresh:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* Page Sections */
.page-section {
  display: none;
  padding: 28px 32px;
  animation: fadeIn 0.25s ease-in-out;
}

.page-section.active {
  display: block;
}

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

/* Cards */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

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

.card-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.card-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* KPI Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-blue { background-color: var(--primary-light); color: var(--primary); }
.icon-rose { background-color: var(--rose-light); color: var(--rose); }
.icon-emerald { background-color: var(--emerald-light); color: var(--emerald); }
.icon-amber { background-color: var(--amber-light); color: var(--amber); }

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.text-rose { color: var(--rose); }
.text-amber { color: var(--amber); }

/* Status Banner */
.status-banner {
  background: linear-gradient(135deg, #F0FDF4 0%, #FFFFFF 100%);
  border-color: var(--emerald-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pulse-ring {
  position: relative;
  width: 24px;
  height: 24px;
}

.ring-core {
  display: block;
  width: 14px;
  height: 14px;
  margin: 5px;
  background-color: var(--emerald);
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-banner h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #065F46;
}

.status-banner p {
  font-size: 0.82rem;
  color: #047857;
}

.banner-badges {
  display: flex;
  gap: 8px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
}

.badge-emerald { background-color: var(--emerald-light); color: #047857; border: 1px solid var(--emerald-border); }
.badge-rose { background-color: var(--rose-light); color: #B91C1C; border: 1px solid var(--rose-border); }
.badge-amber { background-color: var(--amber-light); color: #B45309; border: 1px solid var(--amber-border); }
.badge-indigo { background-color: var(--indigo-light); color: var(--primary); border: 1px solid var(--indigo-border); }
.badge-gray { background-color: #F1F5F9; color: #475569; border: 1px solid #CBD5E1; }

/* 2-Column Grid */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Briefing Item Card */
.briefing-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  background-color: var(--bg-app);
  transition: var(--transition);
}

.briefing-card:hover {
  background-color: #F1F5F9;
  border-color: var(--primary);
}

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

.client-name {
  font-weight: 700;
  font-size: 0.92rem;
}

.client-company {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.briefing-tamil {
  font-size: 0.92rem;
  font-weight: 500;
  color: #1E293B;
  background-color: white;
  padding: 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  margin-bottom: 10px;
}

.briefing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Call Item Card */
.call-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  background-color: var(--bg-app);
}

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

.call-instruction-box {
  background-color: #EEF2FF;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 0.84rem;
  color: #3730A3;
}

/* Data Tables */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}

.data-table th {
  background-color: var(--bg-card-subtle);
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

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

.data-table tbody tr:hover {
  background-color: #F8FAFC;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  flex: 1;
  min-width: 250px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 0.88rem;
  width: 100%;
}

.filter-controls {
  display: flex;
  gap: 12px;
}

.select-input {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background-color: white;
  font-family: inherit;
  font-size: 0.86rem;
  outline: none;
}

/* Tasks Board */
.tasks-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.task-item:hover {
  background-color: white;
  box-shadow: var(--shadow-sm);
}

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

.task-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--emerald);
}

.task-details h4 {
  font-size: 0.94rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.task-details p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Clients Grid */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.client-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  background-color: var(--bg-app);
}

.client-card h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.client-company-tag {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}

.client-stats-row {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Forms */
.settings-form {
  max-width: 700px;
}

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

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

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.input-hint {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  cursor: pointer;
}

/* Switch Slider */
.switch-container {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-container input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #CBD5E1;
  transition: 0.3s;
  border-radius: 24px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.switch-container input:checked + .switch-slider {
  background-color: var(--primary);
}

.switch-container input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-backdrop.show {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-box {
  background: white;
  width: 100%;
  max-width: 580px;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-modal);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box.modal-lg {
  max-width: 680px;
}

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

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

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

.preset-selector {
  margin-bottom: 18px;
  background-color: var(--bg-card-subtle);
  padding: 12px;
  border-radius: var(--radius-md);
}

.preset-selector label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: white;
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.chip:hover, .chip.active {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Audio Player Simulation Widget */
.audio-player-widget {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
  color: white;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  box-shadow: 0 8px 16px rgba(49, 46, 129, 0.3);
}

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

.audio-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #6366F1;
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.audio-play-btn:hover {
  background: #4F46E5;
  transform: scale(1.05);
}

.audio-duration {
  font-size: 0.76rem;
  color: #C7D2FE;
  display: block;
}

.audio-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
}

.audio-wave .bar {
  width: 3px;
  background-color: #818CF8;
  border-radius: 3px;
  animation: wave 1.2s infinite ease-in-out;
}

.audio-wave .bar:nth-child(2) { animation-delay: 0.1s; height: 12px; }
.audio-wave .bar:nth-child(3) { animation-delay: 0.2s; height: 18px; }
.audio-wave .bar:nth-child(4) { animation-delay: 0.3s; height: 10px; }
.audio-wave .bar:nth-child(5) { animation-delay: 0.4s; height: 22px; }
.audio-wave .bar:nth-child(6) { animation-delay: 0.5s; height: 14px; }
.audio-wave .bar:nth-child(7) { animation-delay: 0.6s; height: 20px; }
.audio-wave .bar:nth-child(8) { animation-delay: 0.7s; height: 8px; }
.audio-wave .bar:nth-child(9) { animation-delay: 0.8s; height: 16px; }
.audio-wave .bar:nth-child(10) { animation-delay: 0.9s; height: 24px; }
.audio-wave .bar:nth-child(11) { animation-delay: 1.0s; height: 10px; }
.audio-wave .bar:nth-child(12) { animation-delay: 1.1s; height: 14px; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.transcript-box {
  background-color: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.transcript-box h4 {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.transcript-box pre {
  white-space: pre-wrap;
  font-size: 0.92rem;
  color: var(--text-main);
  background: transparent;
  border: none;
}

.instruction-box {
  background-color: #ECFDF5;
  border: 1px solid var(--emerald-border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.instruction-box p {
  font-size: 0.96rem;
  font-weight: 600;
  color: #065F46;
  margin-top: 6px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}

.toast {
  background: white;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 0.86rem;
  color: var(--text-main);
  animation: slideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.toast-success { border-left-color: var(--emerald); }
.toast.toast-error { border-left-color: var(--rose); }

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

.loading-state {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0; bottom: 0; left: -260px;
  }
  .sidebar.open {
    left: 0;
  }
  .mobile-toggle {
    display: block;
  }
  .grid-2col {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .topbar, .page-section {
    padding-left: 18px;
    padding-right: 18px;
  }
}
