/* ─── Delugs Dashboard — Shared Styles ─── */

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

/* Theme Variables */
:root {
  --bg: #f8f9fa;
  --card: #ffffff;
  --surface: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #1e293b;
  --text-dim: #64748b;
  --text-muted: #94a3b8;
  --text-faint: #cbd5e1;
  --primary: #3b82f6;
  --primary-light: #eff6ff;
  --primary-text: #1d4ed8;
  --primary-hover: #f8fafc;
  --sidebar-w: 260px;
  --max-w: 1200px;
}

/* Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 0;
  line-height: 1.5;
}
h1 { font-size: 20px; font-weight: 700; color: var(--text); }
.subtitle { font-size: 14px; color: var(--text-dim); margin-top: 2px; margin-bottom: 20px; }

/* ═══════════════════════════════════════════
   APP SHELL LAYOUT
   ═══════════════════════════════════════════ */

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

/* ─── Sidebar ─── */
.app-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow: hidden;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.sidebar-brand-img {
  height: 22px;
  width: auto;
  display: block;
}
.sidebar-subtitle {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

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

.nav-group {
  padding-top: 16px;
}
.nav-group:first-child {
  padding-top: 8px;
}
.nav-group + .nav-group {
  border-top: 1px solid var(--border-light);
  margin-top: 8px;
}
.nav-group-label {
  padding: 0 12px;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}
.nav-item:hover {
  background: var(--primary-hover);
  color: var(--text);
}
.nav-item.active {
  background: var(--primary-light);
  color: var(--primary-text);
}
.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar-bottom-links {
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
  margin-top: 8px;
}

.sidebar-user {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.sidebar-user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sidebar-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-email {
  font-size: 11px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-role {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: capitalize;
  margin-top: 4px;
}
.sidebar-user-role.admin { background: #f3e8ff; color: #7c3aed; }
.sidebar-user-role.manager { background: #dbeafe; color: #2563eb; }
.sidebar-user-role.viewer { background: #f1f5f9; color: #64748b; }

.sidebar-signout {
  font-size: 11px;
  color: var(--text-dim);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.sidebar-signout:hover { color: #dc2626; border-color: #fca5a5; background: #fef2f2; }

/* ─── Mobile Header ─── */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}
.mobile-menu-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
  line-height: 1;
}
.mobile-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.mobile-brand-img {
  height: 18px;
  width: auto;
}

/* ─── Sidebar Overlay ─── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 40;
}

/* ─── Main Content Area ─── */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.app-main-inner {
  padding: 24px 32px;
  max-width: var(--max-w);
  width: 100%;
}

/* ─── Responsive: Sidebar collapse ─── */
@media (max-width: 1023px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }
  body.sidebar-open .sidebar-overlay {
    display: block;
  }
  .app-main {
    margin-left: 0;
  }
  .mobile-header {
    display: flex;
  }
  .app-main-inner {
    padding: 16px;
  }
}

/* ═══════════════════════════════════════════
   COMPONENTS
   ═══════════════════════════════════════════ */

/* ─── Toolbar ─── */
.toolbar {
  background: var(--card);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.toolbar-group { display: flex; flex-direction: column; gap: 5px; }
.toolbar-group > label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ─── Button Groups ─── */
.btn-group { display: flex; gap: 1px; }
.btn-group button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  font-weight: 500;
}
.btn-group button:first-child { border-radius: 6px 0 0 6px; }
.btn-group button:last-child { border-radius: 0 6px 6px 0; }
.btn-group button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-group button:hover:not(.active) { background: #e8ecf3; color: var(--text); }

/* ─── Date Inputs ─── */
input[type="date"] {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  width: 130px;
}
.date-row { display: flex; align-items: center; gap: 8px; }
.date-row span { color: var(--text-muted); font-size: 12px; }

/* ─── Metric Checkboxes ─── */
.metric-checks {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.metric-checks label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.metric-checks input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
}
.metric-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ─── Refresh Button ─── */
.refresh-btn {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.15s;
  margin-left: auto;
  white-space: nowrap;
}
.refresh-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.refresh-btn.loading { opacity: 0.5; pointer-events: none; }

/* ─── Summary Cards ─── */
.summary {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 120px;
  flex: 1;
}
.summary-card .label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}
.summary-card .value {
  font-size: 18px;
  font-weight: 600;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* ─── Section Headers ─── */
.section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 20px 0 10px;
}

/* ─── Chart Panels ─── */
.chart-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
}
.chart-panel.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(248,249,250,0.6);
  border-radius: 10px;
  z-index: 10;
}
.chart-panel h3 {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

/* ─── Grids ─── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}

/* ─── Ad / Metric Cards ─── */
.ad-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}
.ad-card h3 {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.ad-card h3 .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.ad-metric {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}
.ad-metric:last-child { border-bottom: none; }
.ad-metric .metric-label { color: var(--text-dim); }
.ad-metric .metric-value { font-weight: 500; font-variant-numeric: tabular-nums; }

/* ─── Error Banner / No Data ─── */
.error-banner {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}
.no-data {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 0;
  font-size: 14px;
}

/* ─── Tab Bar ─── */
.tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.tab-bar button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.tab-bar button:hover { color: var(--text); }
.tab-bar button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Login Page ─── */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px;
  background: var(--bg);
}
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  width: 400px;
  max-width: 100%;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.login-card h1 { margin-bottom: 6px; }
.login-card .login-subtitle {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 32px;
}
.login-card .google-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #333;
  border: 1px solid var(--border);
  padding: 11px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.login-card .google-btn:hover { background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.login-card .google-btn svg { width: 18px; height: 18px; }
.login-error {
  margin-top: 20px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  border-radius: 8px;
  font-size: 13px;
  display: none;
}

/* ─── Hub Dashboard Grid ─── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.hub-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.hub-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
}
.hub-card .hub-icon { font-size: 28px; margin-bottom: 10px; }
.hub-card h3 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.hub-card p { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

/* ─── Placeholder Pages ─── */
.placeholder-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 60px 40px;
  text-align: center;
  max-width: 480px;
}
.placeholder-card .placeholder-icon { font-size: 48px; margin-bottom: 16px; }
.placeholder-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.placeholder-card p { font-size: 14px; color: var(--text-dim); line-height: 1.5; }

/* ═══════════════════════════════════════════
   NEW COMPONENTS — Tables, Badges, Forms, etc.
   ═══════════════════════════════════════════ */

/* ─── Section Titles ─── */
.section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin: 24px 0 10px;
}

/* ─── Data Tables ─── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 10px 14px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); font-weight: 600;
  border-bottom: 2px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--border-light);
  color: var(--text); vertical-align: middle;
}
.data-table tr:hover td { background: var(--primary-hover); }
.data-table .actions { display: flex; gap: 6px; }
.data-table .empty-row td { text-align: center; color: var(--text-muted); padding: 40px 14px; }

/* ─── Badges ─── */
.badge {
  display: inline-block; font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; text-transform: capitalize;
  white-space: nowrap;
}
.badge-admin { background: #f3e8ff; color: #7c3aed; }
.badge-manager { background: #dbeafe; color: #2563eb; }
.badge-viewer { background: #f1f5f9; color: #64748b; }
.badge-active { background: #dcfce7; color: #16a34a; }
.badge-inactive { background: #fee2e2; color: #dc2626; }
.badge-added { background: #dcfce7; color: #16a34a; }
.badge-improved { background: #dbeafe; color: #2563eb; }
.badge-fixed { background: #fef3c7; color: #d97706; }
.badge-changed { background: #f3e8ff; color: #7c3aed; }
.badge-latest { background: var(--primary); color: #fff; }
.badge + .badge { margin-left: 4px; }

/* ─── Buttons ─── */
.btn {
  padding: 7px 16px; border-radius: 6px; font-size: 12px;
  font-family: inherit; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 5px;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: #2563eb; }
.btn-danger { background: #fff; color: #dc2626; border-color: #fca5a5; }
.btn-danger:hover:not(:disabled) { background: #fef2f2; }
.btn-ghost { background: none; color: var(--text-dim); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 11px; }

/* ─── Forms ─── */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 4px;
}
.form-input, .form-select {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; font-family: inherit;
  background: #fff; color: var(--text);
}
.form-input:focus, .form-select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.form-checkbox-group { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.form-checkbox-group label {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--text); cursor: pointer;
  text-transform: none; letter-spacing: 0; font-weight: 400;
}

/* ─── Info Cards ─── */
.info-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px; margin-bottom: 16px;
}
.info-card h3 {
  font-size: 14px; font-weight: 600; margin-bottom: 14px;
  color: var(--text); display: flex; justify-content: space-between; align-items: center;
}
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-dim); }
.info-value { font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 6px; }

/* ─── Expandable/Accordion Sections ─── */
.expandable {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 10px; overflow: hidden;
}
.expandable-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; cursor: pointer; user-select: none;
  transition: background 0.15s;
}
.expandable-header:hover { background: var(--primary-hover); }
.expandable-header h3 {
  font-size: 14px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  margin: 0;
}
.expandable-header h3 span.doc-icon { font-size: 18px; }
.expandable-chevron {
  font-size: 12px; color: var(--text-muted);
  transition: transform 0.2s;
}
.expandable.open .expandable-chevron { transform: rotate(180deg); }
.expandable-body {
  display: none; padding: 0 18px 16px; font-size: 13px;
  color: var(--text-dim); line-height: 1.8;
}
.expandable.open .expandable-body { display: block; }
.expandable-body h4 {
  font-size: 13px; font-weight: 600; color: var(--text);
  margin: 16px 0 6px;
}
.expandable-body h4:first-child { margin-top: 4px; }
.expandable-body ul { margin: 6px 0 6px 18px; }
.expandable-body li { margin-bottom: 4px; }
.expandable-body p { margin-bottom: 6px; }
.expandable-body code {
  background: var(--surface); padding: 1px 5px; border-radius: 3px;
  font-size: 12px; color: var(--primary-text);
}

/* ─── Quick Nav ─── */
.quick-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.quick-nav button {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 14px; font-size: 12px;
  color: var(--text-dim); cursor: pointer; font-family: inherit;
  font-weight: 500; transition: all 0.15s;
}
.quick-nav button:hover {
  background: var(--primary-light);
  color: var(--primary-text); border-color: var(--primary);
}

/* ─── Search Input ─── */
.search-input {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 12px 8px 34px; font-size: 13px;
  font-family: inherit; color: var(--text); width: 280px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px center;
}
.search-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
  background-color: #fff;
}

/* ─── Changelog Entries ─── */
.changelog-entry {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 20px; margin-bottom: 10px;
  cursor: pointer; transition: border-color 0.15s;
}
.changelog-entry:hover { border-color: #cbd5e1; }
.changelog-entry.open { border-color: var(--primary); }
.changelog-entry-header {
  display: flex; justify-content: space-between; align-items: center;
}
.changelog-entry-meta { display: flex; align-items: center; gap: 10px; }
.changelog-entry-version { font-size: 14px; font-weight: 700; color: var(--text); }
.changelog-entry-date { font-size: 12px; color: var(--text-muted); }
.changelog-entry-title { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.changelog-entry-body {
  display: none; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border-light);
}
.changelog-entry.open .changelog-entry-body { display: block; }
.changelog-entry-desc { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; line-height: 1.6; }
.changelog-change {
  display: flex; gap: 8px; align-items: baseline;
  padding: 4px 0; font-size: 13px; color: var(--text-dim);
}

/* ─── Toast Notification ─── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  padding: 12px 20px; border-radius: 8px; font-size: 13px;
  font-weight: 500; color: #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transform: translateY(0); opacity: 1; transition: all 0.3s;
}
.toast.toast-success { background: #16a34a; }
.toast.toast-error { background: #dc2626; }
.toast.toast-hide { transform: translateY(20px); opacity: 0; }

/* ─── Modal Overlay (generic) ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.4); display: none;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-panel {
  background: var(--card); border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  width: 480px; max-width: 90vw; max-height: 85vh; overflow-y: auto;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: var(--text-muted); padding: 2px 6px; border-radius: 4px;
}
.modal-close:hover { background: var(--surface); color: var(--text); }
.modal-body { padding: 22px; }
.modal-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 0 22px 18px;
}

/* ─── Utility ─── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.gap-8 { gap: 8px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
