/* Ekara Startup Suite — Product-grade design system */
:root {
  /* Brand */
  --primary: #059669;
  --primary-hover: #047857;
  --primary-muted: #d1fae5;
  --primary-subtle: #ecfdf5;
  /* Semantic */
  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --error: #ef4444;
  --error-bg: #fee2e2;
  /* Neutrals — OpenVC-style light */
  --bg-app: #f9fafb;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --text-placeholder: #9ca3af;
  --gray-500: #6b7280;
  /* Layout */
  --sidebar-width: 260px;
  --header-height: 64px;
  --content-max: 1280px;
  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  /* Radius — friendlier, pill-friendly */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 9999px;
  /* Shadow — softer, OpenVC-style */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 22px;
  --text-3xl: 26px;
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --tracking-tight: -0.01em;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
}
.app { display: flex; min-height: 100vh; }

/* Sidebar — OpenVC-style clean */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  padding: var(--space-6) 0;
  display: flex;
  flex-direction: column;
  box-shadow: 1px 0 0 0 var(--border-light);
}
.sidebar .logo {
  padding: 0 var(--space-6) var(--space-6);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--primary);
}
.sidebar .logo a { color: inherit; text-decoration: none; display: inline-block; }
.sidebar .logo img.logo-img { display: block; max-height: 56px; width: auto; object-fit: contain; }
.sidebar .nav { flex: 1; }
.sidebar .nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  margin: 0 var(--space-2);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: color 0.15s, background 0.15s;
}
.sidebar .nav a:hover {
  color: var(--text-primary);
  background: var(--border-light);
}
.sidebar .nav a.active {
  color: var(--primary);
  background: var(--primary-subtle);
  font-weight: 600;
}

/* Main */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg-app); }
.header {
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  flex-shrink: 0;
  box-shadow: 0 1px 0 0 var(--border-light);
}
.header h1 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.header-right { display: flex; align-items: center; gap: var(--space-4); }
.company-select {
  padding: var(--space-2) var(--space-3);
  padding-right: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  min-height: 38px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.company-select:hover { border-color: var(--text-muted); }
.company-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12); }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #047857 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
.avatar:hover { opacity: 0.92; transform: scale(1.02); }

/* Notification bell */
.notification-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.notification-bell:hover { background: var(--border-light); color: var(--text-primary); }
.notification-bell:focus { outline: none; }
.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--error);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Notification dropdown popover */
.notification-dropdown { position: relative; }
.notification-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 360px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.notification-dropdown.open .notification-popover { display: flex; }
.notification-popover-header {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-base);
}
.notification-popover-body {
  overflow-y: auto;
  max-height: 280px;
}
.notification-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.notification-item:hover { background: var(--border-light); }
.notification-item-title { font-weight: 500; }
.notification-item-time { font-size: 11px; color: var(--text-tertiary); }
.notification-popover-footer {
  display: block;
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  border-top: 1px solid var(--border-light);
  background: var(--bg-base);
  transition: background 0.15s;
}
.notification-popover-footer:hover { background: var(--border-light); }
.notification-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}
.notification-bell { border: none; background: transparent; cursor: pointer; }
.notification-bell[href] { text-decoration: none; }
.notification-dropdown .notification-bell { border: none; background: transparent; }
.notification-dropdown .notification-bell:hover { background: var(--border-light); }

/* Recommendation cards */
.rec-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
}
.rec-card.rec-high { border-left-color: var(--error); }
.rec-card.rec-medium { border-left-color: var(--warning); }
.rec-card .rec-meta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rec-card .rec-meta .rec-priority { color: var(--error); }
.rec-card .rec-meta .rec-category { color: var(--text-muted); }
.rec-card .rec-meta .rec-impact { color: var(--primary); }
.rec-card .rec-meta .rec-date { color: var(--text-muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.rec-card .rec-title { font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--space-2); color: var(--text-primary); }
.rec-card .rec-target { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-2); }
.rec-card .rec-actions { margin: 0; padding-left: 20px; font-size: var(--text-sm); color: var(--text-primary); line-height: 1.6; }
.rec-card .rec-actions li { margin-bottom: 4px; }
.rec-expert-badge { display: inline-block; font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-4); }

/* Content */
.content {
  flex: 1;
  padding: var(--space-6);
  overflow-x: auto;
}
.content-inner { max-width: var(--content-max); margin: 0 auto; }

/* Page hero — OpenVC-style headline block */
.page-hero {
  margin-bottom: var(--space-6);
}
.page-hero .page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}
.page-hero .page-desc {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.5;
}

/* Toolbar — search/filter strip like OpenVC */
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}
.toolbar .search-wrap {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.toolbar .search-wrap input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-family: inherit;
  background: var(--bg-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 12px center;
  color: var(--text-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.toolbar .search-wrap input::placeholder { color: var(--text-placeholder); }
.toolbar .search-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}
.toolbar .filter-pills { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.toolbar .filter-pill {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.toolbar .filter-pill:hover { background: var(--border-light); color: var(--text-primary); }

/* Section */
.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

/* Cards — OpenVC-style soft */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--border); }
.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.grants-card .grants-intro {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}
.grants-card .grants-list {
  margin-bottom: var(--space-5);
}
.grants-card .grant-item {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-light);
}
.grants-card .grant-item:last-of-type { border-bottom: none; padding-bottom: 0; }
.grants-card .grant-name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.grants-card .grant-criteria {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}
.grants-card .grants-rm-btn { margin-top: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: var(--text-sm);
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  min-height: 36px;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline {
  background: var(--bg-surface);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
}
.btn-outline:hover { background: var(--primary-subtle); }
.btn-secondary {
  background: var(--bg-app);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.btn-secondary:hover { background: var(--border-light); border-color: var(--text-muted); }

/* Metric cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
@media (max-width: 1200px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .metrics-grid { grid-template-columns: 1fr; }
}
.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
  border-left: 3px solid var(--primary);
}
.metric-card:hover { box-shadow: var(--shadow); border-color: var(--border); }
.metric-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}
.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.metric-trend { font-size: var(--text-xs); margin-top: var(--space-2); font-weight: 500; }
.metric-trend.up { color: var(--success); }
.metric-trend.down { color: var(--error); }

/* Major KPI cards with indicators (Metrics page) */
.kpi-section-title { font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); margin-bottom: var(--space-4); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-5); margin-bottom: var(--space-6); }
.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
  border-left-width: 4px;
  border-left-style: solid;
}
.kpi-card:hover { box-shadow: var(--shadow); }
.kpi-card--good { border-left-color: var(--success); }
.kpi-card--warn { border-left-color: var(--warning); }
.kpi-card--risk { border-left-color: var(--error); }
.kpi-card .kpi-label { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-2); }
.kpi-card .kpi-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); margin-bottom: var(--space-2); }
.kpi-card .kpi-trend { font-size: var(--text-sm); font-weight: 500; margin-bottom: var(--space-3); }
.kpi-card .kpi-trend.up { color: var(--success); }
.kpi-card .kpi-trend.down { color: var(--error); }
.kpi-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-top: var(--space-2);
}
.kpi-indicator--good { background: var(--success-bg); color: var(--success); }
.kpi-indicator--warn { background: var(--warning-bg); color: var(--warning); }
.kpi-indicator--risk { background: var(--error-bg); color: var(--error); }
.kpi-indicator svg { flex-shrink: 0; }

/* KPI visuals: sparkline + progress bar */
.kpi-sparkline {
  margin: var(--space-3) 0;
  height: 36px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.kpi-sparkline svg {
  display: block;
  width: 100%;
  height: 100%;
}
.kpi-card--good .kpi-sparkline line,
.kpi-card--good .kpi-sparkline polyline { stroke: var(--success); }
.kpi-card--warn .kpi-sparkline line,
.kpi-card--warn .kpi-sparkline polyline { stroke: var(--warning); }
.kpi-card--risk .kpi-sparkline line,
.kpi-card--risk .kpi-sparkline polyline { stroke: var(--error); }
.kpi-bar-wrap {
  margin: var(--space-3) 0;
  font-size: var(--text-xs); color: var(--text-muted); margin-bottom: 2px;
}
.kpi-bar-track {
  height: 8px;
  background: var(--border-light);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.kpi-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}
.kpi-card--good .kpi-bar-fill { background: var(--success); }
.kpi-card--warn .kpi-bar-fill { background: var(--warning); }
.kpi-card--risk .kpi-bar-fill { background: var(--error); }

/* Data card & table */
.data-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.data-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.data-table th,
.data-table td {
  padding: 12px var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}
.data-table th {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-app);
}
.data-table td { color: var(--text-primary); }
.data-table tbody tr { transition: background 0.1s; }
.data-table tbody tr:nth-child(even) { background: #fafafa; }
.data-table tbody tr:hover { background: var(--border-light); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Projection cards */
.projection-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
@media (max-width: 768px) {
  .projection-cards { grid-template-columns: 1fr; }
}
.projection-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.projection-card:hover { box-shadow: var(--shadow); border-color: var(--border); }
.projection-card .year {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
}
.projection-card .amount {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}
.projection-card .note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* Chart placeholder (legacy bar) */
.chart-placeholder {
  height: 280px;
  background: linear-gradient(180deg, var(--primary-subtle) 0%, transparent 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-end;
  padding: var(--space-5);
  gap: var(--space-3);
  border: 1px solid var(--border-light);
}
.chart-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  min-height: 24px;
  transition: opacity 0.2s;
}
.chart-bar:hover { opacity: 0.9; }

/* Line chart */
.line-chart-wrap {
  height: 280px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
  padding: var(--space-4);
}
.line-chart {
  width: 100%;
  height: 100%;
  display: block;
}
.line-chart .line-chart-value {
  font-size: 11px;
  font-weight: 600;
  fill: var(--text-primary);
  font-family: var(--font-sans);
}
.line-chart .line-chart-label {
  font-size: 12px;
  fill: var(--text-muted);
  font-family: var(--font-sans);
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  text-align: center;
  background: #fafafa;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-subtle);
  color: var(--text-secondary);
}
.upload-zone p { margin-top: var(--space-2); font-size: var(--text-sm); }

/* Toast */
.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  background: var(--text-primary);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: toastIn 0.25s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: var(--space-6);
}
.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}
.modal h3 { font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--space-4); color: var(--text-primary); }
.modal-close {
  float: right;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-muted);
  line-height: 1;
  padding: var(--space-1);
  margin: calc(-1 * var(--space-1));
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.modal-close:hover { color: var(--text-primary); background: var(--border-light); }

/* Form */
.form-group { margin-bottom: var(--space-4); }
.form-group label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.form-group input,
.form-group select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input::placeholder { color: var(--text-placeholder); }
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}
