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

:root,
[data-theme="light"] {
  --bg: #f7f8fc;
  --bg2: #ffffff;
  --bg3: #eef0f7;
  --border: rgba(15, 23, 42, 0.08);
  --border2: rgba(15, 23, 42, 0.14);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #5b4cf5;
  --accent2: #0d9488;
  --accent3: #ea580c;
  --code-bg: #0f1220;
  --code-border: rgba(91, 76, 245, 0.28);
  --surface-hover: rgba(15, 23, 42, 0.04);
  --surface-hover-strong: rgba(15, 23, 42, 0.07);
  --star-color: rgba(91, 76, 245, 0.35);
  --orb1: rgba(91, 76, 245, 0.1);
  --orb2: rgba(13, 148, 136, 0.08);
  --accent-hover: #4a3de0;
  --code-ln: rgba(255, 255, 255, 0.22);
  --nav-hover: rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] {
  --bg: #08090d;
  --bg2: #0e1018;
  --bg3: #141620;
  --border: rgba(255, 255, 255, 0.07);
  --border2: rgba(255, 255, 255, 0.12);
  --text: #e8eaf0;
  --muted: #6b7280;
  --accent: #7c6af7;
  --accent2: #4dd9c0;
  --accent3: #f59e67;
  --code-bg: #0c0e14;
  --code-border: rgba(124, 106, 247, 0.25);
  --surface-hover: rgba(255, 255, 255, 0.04);
  --surface-hover-strong: rgba(255, 255, 255, 0.08);
  --star-color: #ffffff;
  --orb1: rgba(124, 106, 247, 0.12);
  --orb2: rgba(77, 217, 192, 0.07);
  --accent-hover: #6b59e8;
  --code-ln: rgba(255, 255, 255, 0.2);
  --nav-hover: rgba(255, 255, 255, 0.05);
}

body {
  font-family: 'Syne', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── STARFIELD ─── */
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.star {
  position: absolute;
  border-radius: 50%;
  background: var(--star-color);
  animation: twinkle var(--d, 3s) ease-in-out infinite var(--delay, 0s);
}
@keyframes twinkle {
  0%,100%{opacity:var(--min-op,0.2)}
  50%{opacity:var(--max-op,0.9)}
}

/* ─── GLOW ORBS ─── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.orb1 {
  width: 500px; height: 500px;
  background: var(--orb1);
  top: -150px; left: -100px;
}
.orb2 {
  width: 400px; height: 400px;
  background: var(--orb2);
  bottom: 200px; right: -80px;
}

[data-theme="light"] .starfield { opacity: 0.45; }
[data-theme="light"] .orb { filter: blur(100px); }

/* ─── LAYOUT ─── */
.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ─── NAV ─── */
nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  animation: fadeDown 0.5s ease both;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
  list-style: none;
  min-width: 0;
}
.nav-links > li {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--nav-hover); }
.nav-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  background: var(--accent) !important;
  color: white !important;
  font-weight: 600 !important;
  padding: 6px 14px !important;
  border-radius: 8px;
  line-height: 1.25;
}
.nav-cta:hover { background: var(--accent-hover) !important; }
.nav-links .nav-cta:hover { color: white !important; }
button.nav-cta {
  font: inherit;
  border: none;
  cursor: pointer;
}
.nav-badge {
  display: inline-block;
  background: rgba(77,217,192,0.12);
  color: var(--accent2);
  border: 1px solid rgba(77,217,192,0.2);
  border-radius: 20px;
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  padding: 2px 10px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ─── HERO ─── */
.hero {
  padding: 96px 0 80px;
  text-align: center;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border2);
  background: rgba(124,106,247,0.07);
  border-radius: 100px;
  padding: 6px 18px 6px 10px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 36px;
  animation: fadeUp 0.5s ease 0.1s both;
}
.hero-pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.hero-title {
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
  animation: fadeUp 0.5s ease 0.2s both;
}
.hero-title .line2 {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 60%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 44px;
  line-height: 1.7;
  font-weight: 400;
  animation: fadeUp 0.5s ease 0.3s both;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeUp 0.5s ease 0.4s both;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .2s, background .2s;
}
.btn-secondary:hover { border-color: var(--border2); background: var(--surface-hover); }

/* ─── INSTALL BLOCK (toujours style terminal sombre) ─── */
.install-block {
  --term-fg: #e8eaf0;
  --term-muted: #8b93a7;
  --term-border: rgba(255, 255, 255, 0.08);
  --term-cmd: #f59e67;
  --term-str: #4dd9c0;
  --term-kw: #a78bfa;
  margin: 56px auto 0;
  max-width: 540px;
  background: #0c0e14;
  border: 1px solid rgba(124, 106, 247, 0.28);
  border-radius: 14px;
  overflow: hidden;
  color: var(--term-fg);
  animation: fadeUp 0.5s ease 0.5s both;
}
.install-tabs {
  display: flex;
  border-bottom: 1px solid var(--term-border);
  padding: 0 16px;
}
.install-tab {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--term-muted);
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .2s;
}
.install-tab.active { color: var(--term-kw); border-bottom-color: var(--term-kw); }
.install-code {
  padding: 20px 24px;
  font-family: 'DM Mono', monospace;
  font-size: 13.5px;
  line-height: 1.8;
  display: none;
  color: var(--term-fg);
}
.install-code.active { display: block; }
.ic-comment { color: var(--term-muted); font-style: italic; }
.ic-cmd { color: var(--term-cmd); }
.ic-str { color: var(--term-str); }
.ic-kw { color: var(--term-kw); }
.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  float: right;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--term-border);
  color: var(--term-muted);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: -4px;
  transition: background .2s, color .2s;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--term-fg); }

/* ─── STATS ─── */
.stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 72px 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  animation: fadeUp 0.5s ease 0.6s both;
}
.stat {
  flex: 1;
  padding: 28px 20px;
  text-align: center;
  border-right: 1px solid var(--border);
  transition: background .2s;
}
.stat:last-child { border-right: none; }
.stat:hover { background: var(--surface-hover); }
.stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  display: block;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-family: 'DM Mono', monospace;
}

/* ─── SECTION ─── */
.section { margin: 80px 0; }
.section-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  border: 1px solid rgba(124,106,247,0.3);
  background: rgba(124,106,247,0.07);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.section-sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.7;
}

/* ─── FEATURES GRID ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  transition: border-color .2s, transform .2s;
  cursor: default;
}
.feature-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
}
.feature-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 18px;
}
.fi-purple { background: rgba(124,106,247,0.15); }
.fi-teal   { background: rgba(77,217,192,0.12); }
.fi-amber  { background: rgba(245,158,103,0.12); }
.fi-blue   { background: rgba(96,165,250,0.12); }
.fi-pink   { background: rgba(244,114,182,0.12); }
.fi-green  { background: rgba(74,222,128,0.12); }
.feature-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.feature-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
}

/* ─── SPLIT SECTION (code + text) ─── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-top: 80px;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

.code-window {
  --term-fg: #e8eaf0;
  --term-muted: #8b93a7;
  background: #0c0e14;
  border: 1px solid rgba(124, 106, 247, 0.28);
  border-radius: 14px;
  overflow: hidden;
  color: var(--term-fg);
}
.code-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.code-filename {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--term-muted);
  margin-left: 8px;
}
.code-body {
  padding: 20px 22px;
  font-family: 'DM Mono', monospace;
  font-size: 12.5px;
  line-height: 1.9;
  overflow-x: auto;
  color: var(--term-fg);
}
.ln { color: rgba(255, 255, 255, 0.22); display: inline-block; width: 24px; user-select: none; }
.k { color: #c792ea; }
.s { color: #c3e88d; }
.c { color: var(--term-muted); font-style: italic; }
.f { color: #82aaff; }
.v { color: #f78c6c; }
.t { color: #4dd9c0; }

/* ─── COMPONENTS ─── */
.packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.pkg-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  background: var(--bg2);
  transition: border-color .2s, transform .2s;
  cursor: default;
}
.pkg-card:hover { border-color: rgba(124,106,247,0.35); transform: translateY(-2px); }
.pkg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pkg-name {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}
.pkg-version {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-hover);
  padding: 3px 8px;
  border-radius: 4px;
}
.pkg-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 16px;
}
.pkg-install {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  background: #0c0e14;
  border: 1px solid rgba(124, 106, 247, 0.28);
  border-radius: 8px;
  padding: 10px 14px;
  color: #4dd9c0;
}

/* ─── CTA BANNER ─── */
.cta-banner {
  position: relative;
  margin: 80px 0;
  border: 1px solid rgba(124,106,247,0.2);
  border-radius: 20px;
  padding: 64px 48px;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% -20%, rgba(124,106,247,0.12) 0%, transparent 70%);
}
.cta-banner h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.cta-banner p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-left { font-size: 13px; color: var(--muted); }
.footer-left strong { color: var(--text); }
.footer-php-lines {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0.15rem 0 0.35rem;
  vertical-align: middle;
}
.footer-php-tag {
  display: inline-block;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.2;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg3, transparent);
  white-space: nowrap;
}
.footer-php-tag--current {
  border-color: rgba(124, 106, 247, 0.45);
  color: var(--text);
  background: rgba(124, 106, 247, 0.12);
}
.footer-links { display: flex; gap: 20px; list-style: none; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 13px; transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
  .features-grid, .packages { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse { direction: ltr; }
  .stats { flex-direction: column; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  /* nav-links toggled via .open */
}

/* ─── MOBILE NAV TOGGLE ─── */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text);
  border-radius: 8px;
  width: 40px; height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.nav-toggle:hover { background: var(--nav-hover); }
@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px; left: 32px; right: 32px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 14px;
    z-index: 20;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  nav { position: relative; }
}

/* ─── AUTH (dark marketing) ─── */
.auth-wrap { max-width: 26rem; margin: 2.5rem auto 3rem; position: relative; z-index: 1; }
.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 1.1rem;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.auth-card h1 {
  font-family: Syne, system-ui, sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.03em;
}
.auth-card .auth-lead {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
  line-height: 1.45;
}
.auth-mark {
  width: 3.25rem; height: 3.25rem; margin: 0 auto 1rem;
  border-radius: 999px;
  background: rgba(124,106,247,0.15);
  color: var(--accent);
  border: 1px solid rgba(124,106,247,0.25);
  display: flex; align-items: center; justify-content: center;
}
.auth-mark svg { width: 1.5rem; height: 1.5rem; }
.form-stack { display: flex; flex-direction: column; gap: 1.1rem; }
.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.field label .hint { font-weight: 400; color: var(--muted); }
.field-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 0.35rem;
}
.field-row label { margin: 0; }
.input {
  width: 100%;
  border: 1px solid var(--border2);
  border-radius: 0.85rem;
  padding: 0.65rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #5a6270; }
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 106, 247, 0.2);
}
.input.is-invalid {
  border-color: #e57373;
  background: rgba(229, 115, 115, 0.08);
}
.field-error { margin: 0.35rem 0 0; font-size: 0.8rem; color: #f87171; }
.form-errors {
  border-radius: 0.85rem;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}
.form-errors ul { margin: 0.35rem 0 0; padding-left: 1.1rem; }
.btn-block {
  width: 100%;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-family: Syne, system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--accent);
  color: #fff;
  transition: background .2s, transform .15s;
}
.btn-block:hover { background: var(--accent-hover); transform: translateY(-1px); }
.auth-footer {
  margin: 1.35rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}
.auth-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
.link-quiet { font-size: 0.8rem; color: var(--accent2); text-decoration: none; }
.link-quiet:hover { text-decoration: underline; }
.notice-ok {
  display: flex; gap: 0.65rem; align-items: flex-start;
  border-radius: 0.85rem;
  border: 1px solid rgba(77, 217, 192, 0.3);
  background: rgba(77, 217, 192, 0.1);
  color: var(--accent2);
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  margin-bottom: 1rem;
}
.notice-warn {
  border-radius: 0.85rem;
  border: 1px solid rgba(245, 158, 103, 0.35);
  background: rgba(245, 158, 103, 0.1);
  color: var(--accent3);
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.notice-warn ul { margin: 0.35rem 0 0; padding-left: 1.1rem; }
.auth-flash-ok, .auth-flash-err {
  border-radius: 12px; padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 0.9rem;
  max-width: 26rem; margin-left: auto; margin-right: auto;
}
.auth-flash-ok {
  background: rgba(77, 217, 192, 0.12);
  color: var(--accent2);
  border: 1px solid rgba(77, 217, 192, 0.3);
}
.auth-flash-err {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

/* ─── APP PANELS (profile / admin) ─── */
.app-main { padding: 2rem 0 3rem; position: relative; z-index: 1; }
.panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
}
.panel-table-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.panel-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.panel-table th {
  text-align: left;
  padding: 0.75rem 1.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
}
.panel-table td {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  vertical-align: middle;
}
.panel-table tr:last-child td { border-bottom: none; }
.panel-table tr:hover td { background: var(--surface-hover); }
.panel-table .name { color: var(--text); font-weight: 600; }
.badge {
  display: inline-flex; align-items: center;
  font-size: 0.7rem; font-weight: 700;
  padding: 0.15rem 0.55rem; border-radius: 999px;
}
.badge-admin {
  background: rgba(245,158,103,0.15);
  color: var(--accent3);
  border: 1px solid rgba(245,158,103,0.3);
}
.badge-user {
  background: rgba(124,106,247,0.15);
  color: var(--accent);
  border: 1px solid rgba(124,106,247,0.3);
}
.badge-ok {
  background: rgba(77,217,192,0.12);
  color: var(--accent2);
  border: 1px solid rgba(77,217,192,0.25);
}
.avatar {
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  background: rgba(124,106,247,0.2);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem; flex-shrink: 0;
}
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.25rem; }
.select-dark {
  font-size: 0.8rem;
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  background: var(--bg);
  color: var(--text);
}
.btn-sm {
  font-size: 0.75rem; font-weight: 700;
  padding: 0.35rem 0.75rem; border-radius: 8px;
  border: none; cursor: pointer;
  background: var(--accent); color: #fff;
  font-family: Syne, system-ui, sans-serif;
}
.btn-sm:hover { background: var(--accent-hover); }
.btn-danger-sm {
  font-size: 0.8rem; font-weight: 600;
  padding: 0.5rem 1rem; border-radius: 10px;
  border: 1px solid rgba(248,113,113,0.35);
  background: rgba(248,113,113,0.1);
  color: #f87171; cursor: pointer;
}
.btn-danger-sm:hover { background: rgba(248,113,113,0.2); }
.tabs-dark {
  display: inline-flex; gap: 0.25rem;
  padding: 0.25rem; border-radius: 12px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.tabs-dark a {
  padding: 0.45rem 1rem; border-radius: 8px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--muted); text-decoration: none;
}
.tabs-dark a.is-active {
  background: rgba(124,106,247,0.2);
  color: var(--text);
}
.page-title {
  font-family: Syne, system-ui, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0 0 0.35rem;
}
.page-sub { color: var(--muted); font-size: 0.875rem; margin: 0; }
.link-muted { color: var(--muted); text-decoration: none; font-size: 0.875rem; }
.link-muted:hover { color: var(--accent); }
.link-accent { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.875rem; }
.link-accent:hover { text-decoration: underline; }
.footer-left a { color: var(--accent2); text-decoration: none; }
.footer-left a:hover { text-decoration: underline; }

/* ─── THEME TOGGLE ─── */
.nav-logout {
  display: inline-flex;
  margin: 0;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.theme-toggle:hover {
  color: var(--text);
  background: var(--nav-hover);
  border-color: var(--border2);
}
.theme-toggle svg { width: 16px; height: 16px; display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ─── MARKDOWN BODY (news) ─── */
.markdown-body {
  line-height: 1.8;
  color: var(--text);
  font-size: 0.95rem;
}
.markdown-body > *:first-child { margin-top: 0; }
.markdown-body > *:last-child { margin-bottom: 0; }
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  font-family: Syne, system-ui, sans-serif;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 1.5rem 0 0.65rem;
  line-height: 1.25;
}
.markdown-body h2 { font-size: 1.35rem; }
.markdown-body h3 { font-size: 1.15rem; }
.markdown-body h4 { font-size: 1.05rem; }
.markdown-body p { margin: 0 0 1rem; }
.markdown-body ul,
.markdown-body ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}
.markdown-body li { margin: 0.25rem 0; }
.markdown-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.markdown-body a:hover { color: var(--accent-hover); }
.markdown-body strong { font-weight: 700; color: var(--text); }
.markdown-body code {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.85em;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}
.markdown-body pre {
  margin: 0 0 1.15rem;
  padding: 1rem 1.15rem;
  background: #0c0e14;
  border: 1px solid rgba(124, 106, 247, 0.28);
  border-radius: 10px;
  overflow-x: auto;
}
.markdown-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e8eaf0;
  font-size: 0.82rem;
  line-height: 1.7;
}
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.15rem;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
}
.markdown-body thead,
.markdown-body tbody { display: table; width: 100%; }
.markdown-body th,
.markdown-body td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.markdown-body th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.markdown-body tr:hover td { background: var(--surface-hover); }
.markdown-body blockquote {
  margin: 0 0 1rem;
  padding: 0.35rem 0 0.35rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}
