:root {
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --surface-tint: #EEF4FF;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --accent: #2563EB;
  --accent-strong: #1D4ED8;
  --accent-sky: #0284C7;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --heading: #0F172A;
  --success: #059669;
  --success-bg: #ECFDF5;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --warning: #B45309;
  --warning-bg: #FFFBEB;
  --warning-border: #FDE68A;
  --purple: #7C3AED;
  --purple-bg: #F5F3FF;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
}

html[data-theme="dark"] {
  --bg: #0B141E;
  --surface: #152232;
  --surface-alt: #1D2E42;
  --surface-tint: rgba(59, 130, 246, 0.14);
  --border: #2A3C52;
  --border-strong: #3B516B;
  --text: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --accent: #3B82F6;
  --accent-strong: #2563EB;
  --accent-sky: #38BDF8;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --heading: #60A5FA;
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.14);
  --warning-border: rgba(245, 158, 11, 0.35);
  --purple: #A78BFA;
  --purple-bg: rgba(167, 139, 250, 0.15);
  --shadow: 0 14px 36px rgba(2, 6, 23, 0.45);
  --shadow-sm: 0 1px 3px rgba(2, 6, 23, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Standard Portal Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  display: block;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
}

.nav-pill:hover {
  background: var(--surface-alt);
  text-decoration: none;
  color: var(--text);
}

.nav-pill.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

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

.lang-select {
  min-height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* =====================================================
   ELIAM CONSOLE SHELL (Topbar + Slide-over Drawer + Search)
   ===================================================== */
.console-topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
}

.console-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.console-hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.console-hamburger:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.console-project-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  max-width: 240px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.console-project-pill:hover {
  background: var(--surface-alt);
  border-color: var(--border-strong);
}

.console-project-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.console-search-wrap {
  position: relative;
  flex: 1;
  max-width: 540px;
}

.console-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.console-search-box:focus-within {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.console-search-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}

.console-search-kbd {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 1px 6px;
}

.console-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  z-index: 60;
  max-height: 340px;
  overflow-y: auto;
}

.console-search-results.open {
  display: block;
}

.console-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
}

.console-search-item:hover {
  background: var(--surface-alt);
  text-decoration: none;
}

.console-search-cat {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

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

.avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  border: 2px solid var(--accent-soft);
}

.avatar-btn:hover {
  text-decoration: none;
  opacity: 0.92;
}

/* Slide-Over Navigation Drawer (Menu de gauche) */
.console-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.36);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.console-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.console-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 288px;
  max-width: 86vw;
  z-index: 80;
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.console-drawer.open {
  transform: translateX(0);
}

.console-drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.console-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 14px;
}

.drawer-section-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 12px 18px 6px;
}

.drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.drawer-empty-fav {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 18px 8px;
}

.drawer-row {
  display: flex;
  align-items: center;
  padding: 0 10px 0 14px;
  min-height: 40px;
}

.drawer-row:hover {
  background: var(--surface-alt);
}

.drawer-row.active {
  background: var(--accent-soft);
}

.drawer-link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
}

.drawer-link:hover {
  text-decoration: none;
  color: var(--text);
}

.drawer-row.active .drawer-link {
  color: var(--accent);
  font-weight: 600;
}

.drawer-pin-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.drawer-pin-btn:hover {
  background: var(--surface);
  color: var(--accent);
}

.drawer-pin-btn.pinned {
  color: #F59E0B;
}

.console-drawer-foot {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
  flex-shrink: 0;
}

/* Console Welcome Canvas (Premiere page Console) */
.console-welcome-canvas {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 36px 0 28px;
}

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

.welcome-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.welcome-title-row h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.welcome-context-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.welcome-org-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}

.welcome-org-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.welcome-meta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.welcome-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.copy-mini-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}

.copy-mini-btn:hover {
  background: var(--surface-alt);
  color: var(--accent);
}

.welcome-links-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  font-size: 13px;
  font-weight: 600;
}

.welcome-links-row a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.welcome-action-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.action-chip:hover {
  border-color: var(--accent);
  background: var(--surface-tint);
  color: var(--accent);
  text-decoration: none;
}

.action-chip-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.welcome-promo-card {
  position: relative;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
}

.welcome-promo-card p {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.welcome-promo-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--accent);
}

/* Quick Access Grid (4 cartes epurees) */
.section-label {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.quick-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--accent);
}

.quick-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--accent);
  flex-shrink: 0;
}

/* Notify-Style Crisp KPI Cards */
.notify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
}

.notify-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.notify-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.notify-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notify-kpi-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.notify-kpi-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notify-kpi-icon.blue {
  background: var(--accent-soft);
  color: var(--accent);
}

.notify-kpi-icon.green {
  background: var(--success-bg);
  color: var(--success);
}

.notify-kpi-icon.purple {
  background: var(--purple-bg);
  color: var(--purple);
}

.notify-kpi-icon.amber {
  background: var(--warning-bg);
  color: var(--warning);
}

.notify-kpi-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}

.notify-kpi-value.accent {
  color: var(--accent-sky);
}

.notify-kpi-value.green {
  color: var(--success);
}

.notify-kpi-value.purple {
  color: var(--purple);
}

.notify-kpi-foot {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Main Workspace Layout */
.page-main {
  padding: 24px 0 88px;
  min-height: calc(100vh - 120px);
}

.console-inner-main {
  padding: 20px 0 80px;
  min-height: calc(100vh - 116px);
}

.console-split {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: calc(100vh - 56px);
}

.console-left-rail {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
}

.console-rail-project {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  margin-bottom: 16px;
  cursor: pointer;
}

.console-rail-project:hover {
  border-color: var(--accent);
}

.console-content-area {
  padding: 22px 28px 64px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

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

.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  position: sticky;
  top: 72px;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 8px 10px 6px;
  font-weight: 600;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 3px;
}

.sidebar-link:hover {
  background: var(--surface-alt);
  color: var(--text);
  text-decoration: none;
}

.sidebar-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* Cards & Grids */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card-compact {
  padding: 16px;
}

.card-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--heading);
}

.card-subtitle {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--heading);
}

/* Auth centered layout */
.auth-wrap {
  max-width: 440px;
  margin: 24px auto;
}

.auth-wide {
  max-width: 520px;
  margin: 20px auto;
}

/* Forms */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input,
select.input,
textarea.input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

textarea.input {
  min-height: 86px;
  resize: vertical;
}

.input:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-block {
  width: 100%;
}

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

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

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-alt);
  border-color: var(--accent);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.25);
}

.btn-danger:hover {
  background: var(--danger);
  color: #FFFFFF;
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12.5px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 16px;
}

.tab-btn {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

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

.tab-panel {
  display: none;
}

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

/* Badges & Alerts */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.badge-info {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.25);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(5, 150, 105, 0.25);
}

.alert-info {
  background: var(--surface-tint);
  color: var(--text);
  border-color: var(--border);
}

/* Tables & Lists */
.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data-table th,
table.data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.data-table th {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

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

.row-item:last-child {
  border-bottom: 0;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  word-break: break-all;
}

.empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}

/* Hero Landing */
.hero {
  background: linear-gradient(135deg, #0B2545 0%, #152232 60%, #1D4ED8 140%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  color: #F8FAFC;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 10px 0;
  font-size: 28px;
  color: #FFFFFF;
}

.hero p {
  margin: 0 0 20px;
  max-width: 680px;
  color: #E2E8F0;
  font-size: 15px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.28);
}

.hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Mobile Bottom Nav (masque en desktop >= 1024px) */
.mobile-bottom-nav {
  display: none !important;
}

/* Toast & Modals */
.eliam-toast-stack {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.eliam-toast {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 13.5px;
}

.eliam-toast.success {
  border-left-color: var(--success);
}

.eliam-toast.error {
  border-left-color: var(--danger);
}

.eliam-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.52);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.eliam-modal-backdrop.open {
  display: flex;
}

.eliam-modal {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow-y: auto;
}

.eliam-modal-lg {
  max-width: 620px;
}

.eliam-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

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

.hidden {
  display: none !important;
}

.code-block {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #0F172A;
  border: 1px solid var(--border);
  color: #E2E8F0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
}

.preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  background: var(--surface-alt);
}

.api-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 1023.98px) {

  .topbar-nav,
  .console-search-wrap,
  .sidebar,
  .console-left-rail {
    display: none;
  }

  .shell-grid,
  .console-split,
  .welcome-grid {
    grid-template-columns: 1fr;
  }

  .console-content-area {
    padding: 16px 16px 84px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .quick-access-grid,
  .notify-kpi-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 22px 18px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .site-footer {
    padding-bottom: 84px;
  }

  .eliam-toast-stack {
    bottom: 76px;
    left: 16px;
    right: 16px;
    max-width: none;
  }

  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: var(--surface);
    border-top: 1px solid var(--border);
    min-height: 60px;
    padding: 4px 8px;
    justify-content: space-around;
    align-items: center;
  }

  .mobile-bottom-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 56px;
    padding: 4px 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    gap: 2px;
  }

  .mobile-bottom-link.active {
    color: var(--accent);
    font-weight: 600;
  }
}