/* ============================================
   Neos Craft — Stylesheet
   Premium dark theme, accent #84B899
   ============================================ */

/* ---------- Tokens ---------- */
:root {
  --accent: #84B899;
  --accent-soft: rgba(132, 184, 153, 0.16);
  --accent-glow: rgba(132, 184, 153, 0.35);

  --bg: #0c0f0d;
  --bg-2: #11161a;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);

  --text: #e9eee9;
  --text-dim: #95a399;
  --text-mute: #6a7670;

  --danger: #e26d6d;
  --danger-soft: rgba(226, 109, 109, 0.12);
  --warn: #d6b56b;
  --success: #84B899;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --sidebar-w: 260px;
  --topbar-h: 64px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow:    0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 160ms var(--ease);
  --t-base: 240ms var(--ease);
  --t-slow: 480ms var(--ease);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--accent-soft); color: var(--text); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  transition: background var(--t-base);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-glow); }

/* ---------- Background orbs (subtle ambient) ---------- */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: orbFloat 18s ease-in-out infinite;
}
.orb-1 { width: 480px; height: 480px; background: #84B899; top: -120px; left: -120px; }
.orb-2 { width: 360px; height: 360px; background: #4f7d68; bottom: -100px; right: -80px; animation-delay: -6s; opacity: 0.25; }
.orb-3 { width: 300px; height: 300px; background: #6fa896; top: 40%; left: 50%; transform: translate(-50%, -50%); animation-delay: -12s; opacity: 0.15; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.05); }
  66%      { transform: translate(-30px, 30px) scale(0.95); }
}

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.content {
  flex: 1;
  padding: 32px clamp(20px, 4vw, 48px);
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  background: linear-gradient(180deg, rgba(17, 22, 26, 0.85), rgba(12, 15, 13, 0.85));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  overflow: hidden;
  z-index: 50;
}

.sidebar-glow {
  position: absolute;
  top: 0; left: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity var(--t-base);
  filter: blur(40px);
}
.sidebar:hover .sidebar-glow { opacity: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-flex;
  width: 34px; height: 34px;
  border-radius: 9px;
  align-items: center; justify-content: center;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  transition: transform var(--t-base);
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.brand-text { font-size: 15px; }

/* Nav */
.nav { flex: 1; margin-top: 6px; }
.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  padding: 18px 10px 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.nav-link:hover {
  background: var(--surface-hover);
  color: var(--text);
  transform: translateX(2px);
}
.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--text);
}
.nav-link.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-link--accent { color: var(--accent); }
.nav-link--accent.is-active { background: var(--accent-soft); }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; opacity: 0.85; }

/* Language switcher */
.lang-switch {
  display: inline-flex;
  gap: 4px;
  padding: 10px 8px 0;
  margin-top: auto;
}
.lang-switch--topbar {
  padding: 0;
  margin: 0;
}
.lang-switch--center {
  justify-content: center;
  width: 100%;
  padding: 0 0 12px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--border);
}
.lang-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.lang-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.lang-btn.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(132, 184, 153, 0.25);
}

/* Sidebar footer */
.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #5e8c75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  color: #0c0f0d;
  flex: 0 0 28px;
}
.user-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logout-form { margin: 0; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(20px, 4vw, 48px);
  height: var(--topbar-h);
  background: rgba(12, 15, 13, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.menu-toggle {
  display: none;
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  transition: background var(--t-fast), color var(--t-fast);
}
.menu-toggle:hover { background: var(--surface-hover); color: var(--text); }
.topbar-title { flex: 1; min-width: 0; }
.topbar-eyebrow {
  display: block;
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topbar-h1 {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.theme-toggle {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  border: 1px solid var(--border);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.theme-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-strong);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn--primary {
  background: var(--accent);
  color: #0c0f0d;
  font-weight: 600;
  box-shadow: 0 4px 16px -4px var(--accent-glow);
}
.btn--primary:hover {
  background: #94c4a6;
  box-shadow: 0 8px 24px -4px var(--accent-glow);
}

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

.btn--danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}
.btn--danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn--lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn--xs { padding: 5px 10px; font-size: 12px; }
.btn--block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 48px 0 24px;
}
.hero-inner { max-width: 720px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.2); }
}

.hero-title {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 18px;
}
.text-accent { color: var(--accent); }
.hero-sub {
  font-size: 17px;
  color: var(--text-dim);
  margin: 0 0 28px;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}
.hero-cta .ip {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 5px;
}

.hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: max-content;
}
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label {
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.meta-value {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ---------- Cards / features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 32px;
}
.card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background var(--t-base), border-color var(--t-base), transform var(--t-base);
}
.card:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.card-icon {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---------- Pages ---------- */
.page { padding: 12px 0 32px; }
.page-head { margin-bottom: 32px; max-width: 720px; }
.page-head h2 {
  margin: 6px 0 10px;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.02em;
  font-weight: 600;
}
.page-sub { color: var(--text-dim); margin: 0; }

.prose { max-width: 720px; }
.prose h3 { margin: 28px 0 10px; font-size: 17px; font-weight: 600; }
.prose p { color: var(--text-dim); }
.prose ul { color: var(--text-dim); padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose code {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 2px 6px;
  background: var(--surface-2);
  border-radius: 4px;
}

/* ---------- Rules ---------- */
.rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rule {
  display: flex;
  gap: 18px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background var(--t-base), border-color var(--t-base), transform var(--t-base);
}
.rule:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateX(4px);
}
.rule-num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  flex: 0 0 auto;
  padding-top: 2px;
}
.rule h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.rule p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* ---------- Forms ---------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
}
.form--inline {
  max-width: none;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
}
.form-actions { display: flex; gap: 10px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  font-weight: 500;
}
.field-hint {
  font-size: 12px;
  color: var(--text-mute);
}
.field input,
.field textarea,
.field select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}
.field textarea,
textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}
.field input:focus,
.field textarea:focus,
.field select:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-mute); }

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

/* ---------- Alerts ---------- */
.alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert--error {
  background: var(--danger-soft);
  border-color: rgba(226, 109, 109, 0.25);
  color: #f4a8a8;
}
.alert--success {
  background: var(--accent-soft);
  border-color: rgba(132, 184, 153, 0.25);
  color: var(--accent);
}

/* ---------- Tables ---------- */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table thead th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}
.table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr {
  transition: background var(--t-fast);
}
.table tbody tr:hover { background: var(--surface-2); }

.t-right { text-align: right; }
.t-mono { font-family: var(--font-mono); font-size: 13px; }
.t-dim { color: var(--text-dim); }

.user-cell { display: inline-flex; align-items: center; gap: 10px; }
.user-avatar--sm { width: 24px; height: 24px; font-size: 11px; flex-basis: 24px; }

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.role-form { display: inline-flex; margin: 0; }
.role-form select { padding: 6px 8px; font-size: 13px; }

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-dim);
}
.role-super-admin { color: var(--accent); background: var(--accent-soft); border-color: rgba(132, 184, 153, 0.3); }
.role-admin { color: #b3d4a3; background: rgba(132, 184, 153, 0.08); border-color: rgba(132, 184, 153, 0.2); }

/* ---------- Admin panel ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.stat-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background var(--t-base), transform var(--t-base);
}
.stat-card:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
}
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}
.stat-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.stat-value--sm { font-size: 16px; font-family: var(--font-mono); }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background var(--t-base), border-color var(--t-base), transform var(--t-base);
}
.action-card:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.action-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
}
.action-card h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; }
.action-card p { margin: 0; font-size: 13px; color: var(--text-dim); }
.action-arrow { margin-left: auto; color: var(--text-mute); transition: transform var(--t-fast), color var(--t-fast); }
.action-card:hover .action-arrow { transform: translateX(4px); color: var(--accent); }

/* ---------- Collapsible panel ---------- */
.panel-collapsible {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.panel-collapsible summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  list-style: none;
  color: var(--text);
}
.panel-collapsible summary::-webkit-details-marker { display: none; }
.panel-collapsible[open] summary { margin-bottom: 16px; }

/* ---------- Auth pages ---------- */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-wrap {
  width: 100%;
  max-width: 400px;
  position: relative;
}
.auth-back {
  position: absolute;
  top: -36px;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
  transition: color var(--t-fast);
}
.auth-back:hover { color: var(--text); }
.auth-card {
  padding: 32px 28px;
  background: rgba(17, 22, 26, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.auth-head {
  text-align: center;
  margin-bottom: 24px;
}
.brand-mark--lg {
  width: 56px; height: 56px;
  border-radius: 14px;
  margin: 0 auto 16px;
}
.auth-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.auth-sub {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}
.auth-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  justify-content: center;
  gap: 6px;
}
.auth-foot a { color: var(--accent); font-weight: 500; }
.auth-foot a:hover { text-decoration: underline; }

.error-code {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  line-height: 1;
  margin-bottom: 8px;
}

/* ---------- Footer ---------- */
.foot {
  padding: 24px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-mute);
}
.foot a { color: var(--text-dim); transition: color var(--t-fast); }
.foot a:hover { color: var(--accent); }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 0.7s var(--ease) forwards;
}
.reveal:nth-child(2) { animation-delay: 60ms; }
.reveal:nth-child(3) { animation-delay: 120ms; }
.reveal:nth-child(4) { animation-delay: 180ms; }

@keyframes reveal {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    position: fixed;
    left: 0; top: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform var(--t-base);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }
  .layout { grid-template-columns: 1fr; }
  .content { padding: 20px 18px; }
  .topbar { padding: 14px 18px; }
  .hero-meta { gap: 18px; padding: 14px 16px; }
}

@media (max-width: 540px) {
  .form--inline { flex-direction: column; align-items: stretch; }
  .form--inline .field, .form--inline button { width: 100%; }
  .table thead { display: none; }
  .table tbody td { display: block; padding: 6px 16px; }
  .table tbody td:first-child { padding-top: 14px; }
  .table tbody td:last-child { padding-bottom: 14px; border-bottom: 0; }
  .table tbody tr { display: block; border-bottom: 1px solid var(--border); }
  .table tbody tr:last-child { border-bottom: 0; }
  .t-right { text-align: left; }
  .row-actions { justify-content: flex-start; }
}
