@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=JetBrains+Mono:wght@400;600&display=swap");

:root {
  --bg: #f6f4ef;
  --bg-2: #efeae2;
  --panel: #ffffff;
  --panel-2: #f9f7f3;
  --text: #1a1b1e;
  --muted: #5b6270;
  --accent: #ff6b2d;
  --accent-2: #ffb52d;
  --border: #e6e0d7;
  --shadow: rgba(28, 23, 17, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(800px 400px at 90% -10%, #ffe8c2 0%, rgba(255, 232, 194, 0) 60%),
    radial-gradient(700px 380px at 5% 10%, #ffd9cc 0%, rgba(255, 217, 204, 0) 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 107, 45, 0.24), transparent 22%),
    radial-gradient(circle at 72% 18%, rgba(255, 181, 45, 0.16), transparent 24%),
    radial-gradient(circle at 82% 72%, rgba(112, 71, 255, 0.12), transparent 18%);
  filter: blur(28px);
  animation: shaderShift 12s ease-in-out infinite alternate;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 100%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; gap: 14px; align-items: center; }
.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #1a0e06;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 12px 22px rgba(255, 107, 45, 0.25);
}
.brand h1 { margin: 0; font-size: 20px; letter-spacing: 0.3px; }
.muted { color: var(--muted); font-size: 13px; }

.top-actions { display: flex; align-items: center; gap: 12px; }
.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f2f6ee;
  border: 1px solid #dfe9d7;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
}
.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #3dbf5c;
  box-shadow: 0 0 8px rgba(61, 191, 92, 0.6);
}

.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 78px);
}

.sidebar {
  padding: 18px 16px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 247, 243, 0.9) 100%);
  position: relative;
  overflow: hidden;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 107, 45, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 107, 45, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black 10%, transparent 100%);
  pointer-events: none;
}

.sidebar-head { display: flex; gap: 8px; margin-bottom: 14px; }
.chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f2efe9;
  border: 1px solid var(--border);
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
}

.nav-btn:hover { background: #fff7ed; border-color: #ffd9c2; }
.nav-btn.active {
  background: #fff2e6;
  border-color: #ffc09a;
  box-shadow: 0 8px 20px rgba(255, 107, 45, 0.15);
  transform: translateX(4px);
}

.tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 6px;
  border-radius: 6px;
  background: #ffe9d6;
  color: #a4431e;
}

.sidebar-foot { margin-top: 18px; font-size: 12px; }

.content { padding: 22px 26px 40px; }

.content {
  position: relative;
}

.dashboard-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(255, 107, 45, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 107, 45, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 85%);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  background: #ffffffcc;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 22px var(--shadow);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: panelRise 0.55s ease;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(255, 107, 45, 0.1), transparent 20%);
  z-index: -1;
}

.hero h2 { margin: 0 0 6px; }
.hero-copy { display: flex; flex-direction: column; gap: 8px; }

.landing-board {
  position: relative;
  min-width: 270px;
  padding: 18px 20px;
  border-radius: 16px;
  color: #fff4ee;
  background: linear-gradient(135deg, #1b1020 0%, #44211b 42%, #ff6b2d 100%);
  box-shadow: 0 18px 30px rgba(68, 33, 27, 0.28);
  animation: boardFloat 4.8s ease-in-out infinite;
}

.landing-board h2,
.landing-board p {
  margin: 0;
  position: relative;
  z-index: 1;
}

.landing-board h2 { font-size: 28px; }
.landing-board p { margin-top: 6px; color: #ffd6c2; }

.landing-pulse {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 55%);
  animation: pulseSpin 6s linear infinite;
}

.rive-shell {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(15, 12, 26, 0.92), rgba(35, 18, 27, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 30px rgba(17, 11, 12, 0.2);
}

.rive-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.08) 45%, transparent 100%);
  transform: translateX(-120%);
  animation: shineSweep 6s ease-in-out infinite;
  pointer-events: none;
}

.login-rive-shell {
  margin-top: 26px;
  width: min(420px, 100%);
  height: 320px;
}

.hero-rive-shell {
  width: 220px;
  min-width: 220px;
  height: 180px;
}

.rive-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.rive-fallback::before {
  content: "Animation unavailable";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-metrics { display: flex; gap: 10px; }
.mini-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 110px;
  box-shadow: 0 6px 14px var(--shadow);
  animation: panelRise 0.7s ease both;
  position: relative;
  overflow: hidden;
}
.mini-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% auto;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(255, 181, 45, 0.16), transparent 65%);
}
.mini-card .label { display: block; font-size: 11px; color: var(--muted); }

.panel { display: none; }
.panel.active { display: block; animation: panelRise 0.35s ease; }

.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-header h2, .panel-header h3 { margin: 0; }
.panel-kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #a4431e;
  background: #ffe6d4;
  border: 1px solid #ffc6a2;
  border-radius: 999px;
  padding: 5px 10px;
}

.btn {
  background: var(--accent);
  color: #2b1208;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(255, 107, 45, 0.2);
}

.btn:hover { filter: brightness(0.95); }

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

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

input[type="text"], textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.split > div {
  animation: cardReveal 0.4s ease both;
}

.desktop-shell {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 239, 233, 0.92));
  box-shadow: 0 18px 36px rgba(28, 23, 17, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, height 0.25s ease;
}

.desktop-shell.is-minimized .desktop-stage {
  display: none;
}

.desktop-shell.is-maximized {
  position: fixed;
  inset: 18px;
  z-index: 1200;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(18, 10, 10, 0.3);
}

.desktop-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff7ef, #f8eee4);
}

.window-dots {
  display: flex;
  gap: 8px;
}

.window-dots span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.window-dots span:nth-child(1) { background: #ff7b72; }
.window-dots span:nth-child(2) { background: #ffc857; }
.window-dots span:nth-child(3) { background: #36c98f; }

.desktop-title {
  font-size: 13px;
  color: var(--muted);
}

.desktop-stage {
  height: 76vh;
  min-height: 620px;
  background:
    linear-gradient(rgba(255, 107, 45, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 107, 45, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.3), transparent 60%);
  background-size: 28px 28px, 28px 28px, auto;
}

.desktop-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.login-layout-v2 {
  grid-template-columns: 1.05fr 1fr;
  align-items: stretch;
}

.welcome-stage-v2 {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.welcome-stage-top {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.welcome-copy-grid {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.welcome-facts {
  display: grid;
  gap: 12px;
}

.welcome-fact {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.welcome-fact span {
  display: block;
  color: #ffcdb7;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.welcome-fact strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
}

.login-rive-shell-v2 {
  width: min(460px, 100%);
  align-self: center;
}

.welcome-stage-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.footer-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-stat span {
  display: block;
  color: #ffcdb7;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.footer-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.auth-shell {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 242, 235, 0.96));
  border: 1px solid #ead8ca;
  box-shadow: 0 28px 60px rgba(28, 23, 17, 0.12);
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 107, 45, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 107, 45, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 100%);
  pointer-events: none;
}

.auth-shell-head,
.auth-switcher,
.auth-alerts,
.auth-panels {
  position: relative;
  z-index: 1;
}

.auth-shell-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.auth-panel-copy {
  margin-bottom: 16px;
}

.auth-panel-copy h2 {
  margin: 0 0 8px;
}

.auth-request-form {
  max-width: none;
}

.auth-single-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.modal-rive-shell {
  height: 320px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 10, 12, 0.55);
  backdrop-filter: blur(10px);
}

.auth-modal-dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  animation: modalIn 0.24s ease forwards;
}

.auth-modal.is-open .auth-modal-dialog {
  animation: modalIn 0.24s ease forwards;
}

.auth-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid #efcfb8;
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.9);
  color: #7a4b31;
  cursor: pointer;
  font-weight: 700;
}

.auth-modal-close:hover {
  background: #fff2e5;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(28, 23, 17, 0.06);
}
.table tr { border-bottom: 1px solid var(--border); }
.table th, .table td { padding: 10px 12px; text-align: left; }
.table tr:hover { background: #fff7ed; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.chart-card {
  min-height: 260px;
}

.chart-card canvas {
  width: 100%;
  height: 190px !important;
}
.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 247, 243, 0.92));
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 10px 20px var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: cardReveal 0.45s ease both;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, transparent 100%);
  transform: translateX(-120%);
  animation: shineSweep 7s ease-in-out infinite;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px rgba(28, 23, 17, 0.12);
  border-color: #ffc09a;
}

.editor {
  height: 420px;
  font-family: "JetBrains Mono", "Consolas", monospace;
}

.terminal {
  position: relative;
  height: 520px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #0b0f14;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 12px 24px rgba(8, 12, 18, 0.18);
}

.terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}

.terminal-screen {
  margin: 0;
  height: 100%;
  padding: 16px;
  overflow: auto;
  color: #d7e0ea;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-xterm {
  position: relative;
  height: 100%;
  width: 100%;
  padding: 10px 8px;
}

.terminal-xterm .xterm {
  height: 100%;
}

.terminal-xterm .xterm-viewport {
  border-radius: 10px;
}

.terminal-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  resize: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
}

.output {
  height: 240px;
  overflow: auto;
  background: #0f141b;
  color: #d2d7de;
  border: 1px solid #1e2633;
  padding: 12px;
  border-radius: 12px;
  font-family: "JetBrains Mono", "Consolas", monospace;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.list { display: grid; gap: 10px; }
.list .item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.note {
  background: #fff7ed;
  border: 1px solid #ffd9c2;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(28, 23, 17, 0.05);
}

.admin-note {
  margin-bottom: 12px;
}

.admin-monitor-cards {
  margin-bottom: 12px;
}

.admin-policy-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.admin-policy-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #f0d7c6;
  background: linear-gradient(180deg, rgba(255, 250, 246, 0.95), rgba(253, 245, 237, 0.78));
  box-shadow: 0 12px 24px rgba(28, 23, 17, 0.05);
}

.admin-policy-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: #9f5d3d;
}

.admin-policy-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.admin-policy-card input {
  width: 96px;
}

.admin-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-btn input { display: none; }

.alert {
  background: #fff0f0;
  border: 1px solid #f5c2c2;
  padding: 10px;
  border-radius: 10px;
  color: #8a1f1f;
  margin-bottom: 12px;
}

.alert.success {
  background: #edf9ef;
  border-color: #b8e1c0;
  color: #1f6a31;
}

.status-tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.status-pending {
  background: #fff1cf;
  color: #9a6a00;
}

.status-approved {
  background: #e8f8ee;
  color: #237846;
}

.status-rejected {
  background: #ffe8e8;
  color: #a33a3a;
}

.status-terminated {
  background: #f2e9ff;
  color: #6640a8;
}

.btn.danger {
  background: #6b1d1d;
  border-color: #6b1d1d;
  color: #fff7f7;
}

.btn.danger:hover {
  background: #571515;
  border-color: #571515;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.landing-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.landing-layout {
  width: min(1180px, 100%);
}

.landing-stage {
  position: relative;
  overflow: hidden;
  min-height: 780px;
  border-radius: 30px;
  padding: 44px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 181, 45, 0.18), transparent 24%),
    radial-gradient(circle at 80% 20%, rgba(112, 71, 255, 0.16), transparent 24%),
    linear-gradient(145deg, #100d14 0%, #1e1217 35%, #351d18 100%);
  color: #fff5ec;
  box-shadow: 0 28px 70px rgba(18, 10, 10, 0.3);
}

.landing-title {
  margin: 26px 0 10px;
  font-size: clamp(56px, 10vw, 120px);
  line-height: 0.9;
}

.landing-subtitle {
  margin: 0 0 18px;
  color: #ffd0bc;
  font-size: 20px;
}

.landing-copy {
  display: grid;
  gap: 8px;
  max-width: 580px;
  color: #f3ddd4;
  font-size: 18px;
}

.landing-copy p {
  margin: 0;
}

.landing-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.landing-shell-page .landing-stage {
  animation: panelRise 0.55s ease;
}

.page-reveal .reveal {
  opacity: 0;
  animation: staggerReveal 0.7s cubic-bezier(.2,.8,.2,1) forwards;
}

.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.12s; }
.reveal-3 { animation-delay: 0.2s; }
.reveal-4 { animation-delay: 0.28s; }
.reveal-5 { animation-delay: 0.36s; }
.reveal-6 { animation-delay: 0.44s; }
.reveal-7 { animation-delay: 0.52s; }

.landing-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
}

.landing-grid-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.landing-grid-line.line-a {
  top: 20%;
  left: -10%;
  width: 50%;
  height: 1px;
}

.landing-grid-line.line-b {
  top: 58%;
  right: -12%;
  width: 42%;
  height: 1px;
}

.landing-grid-line.line-c {
  left: 62%;
  top: 10%;
  width: 1px;
  height: 36%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.landing-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
  width: min(760px, 100%);
}

.landing-entry-card {
  position: relative;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 218, 193, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 36px rgba(9, 6, 9, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.landing-entry-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 202, 161, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
}

.entry-kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 187, 137, 0.14);
  color: #ffd3b2;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 11px;
}

.landing-entry-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.landing-entry-card p {
  margin: 0;
  color: #f2d9cc;
}

.landing-rive-shell {
  margin-top: 32px;
  width: min(620px, 100%);
  height: 340px;
}

.landing-rive-shell-hero {
  position: relative;
  border-radius: 28px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 220, 191, 0.14);
  backdrop-filter: blur(8px);
  box-shadow: 0 22px 44px rgba(9, 6, 9, 0.22);
}

.landing-rive-shell-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -20% auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 161, 71, 0.22), transparent 68%);
  pointer-events: none;
}

.login-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  width: min(1180px, 100%);
}

.welcome-stage {
  position: relative;
  overflow: hidden;
  min-height: 760px;
  border-radius: 28px;
  padding: 36px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 181, 45, 0.24), transparent 28%),
    radial-gradient(circle at 80% 80%, rgba(255, 107, 45, 0.2), transparent 28%),
    linear-gradient(145deg, #130d12 0%, #24141a 45%, #3f2019 100%);
  color: #fff4ec;
  box-shadow: 0 24px 60px rgba(20, 10, 8, 0.26);
}

.auth-page-shell {
  position: relative;
  overflow: hidden;
}

.auth-page-layout {
  position: relative;
  z-index: 1;
}

.auth-side-stage {
  animation: panelRise 0.5s ease;
}

.auth-shell-single {
  animation: panelRise 0.65s ease;
}

.auth-window {
  position: relative;
  border-radius: 28px;
  box-shadow: 0 26px 54px rgba(12, 10, 14, 0.18);
}

.auth-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -2px -2px 20px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(224, 200, 183, 0.7);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 248, 241, 0.92), rgba(248, 240, 232, 0.72));
}

.window-dots {
  display: flex;
  gap: 8px;
}

.window-dots span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.window-dots span:nth-child(1) { background: #ff8e70; }
.window-dots span:nth-child(2) { background: #ffc65c; }
.window-dots span:nth-child(3) { background: #68d391; }

.window-label {
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #8b5d42;
}

.auth-side-stage-login {
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 181, 45, 0.25), transparent 28%),
    radial-gradient(circle at 84% 76%, rgba(255, 94, 58, 0.22), transparent 26%),
    linear-gradient(145deg, #110d12 0%, #25161c 45%, #432219 100%);
}

.auth-side-stage-request {
  background:
    radial-gradient(circle at 20% 18%, rgba(248, 255, 140, 0.15), transparent 25%),
    radial-gradient(circle at 78% 20%, rgba(255, 151, 94, 0.18), transparent 26%),
    linear-gradient(145deg, #10141b 0%, #17212c 48%, #2a1f1a 100%);
}

.auth-shell-login {
  position: relative;
  overflow: hidden;
}

.auth-shell-login::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 181, 45, 0.06), transparent 35%),
    linear-gradient(315deg, rgba(255, 120, 48, 0.05), transparent 42%);
  pointer-events: none;
}

.auth-shell-request {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(244, 247, 251, 0.96));
}

.auth-shell-request::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(184, 198, 212, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 198, 212, 0.14) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.34), transparent 88%);
  pointer-events: none;
}

.login-rive-shell-login {
  width: min(420px, 100%);
  height: 360px;
  margin-top: 28px;
  margin-left: auto;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 221, 188, 0.14);
}

.login-rive-shell-request {
  width: min(320px, 100%);
  height: 320px;
  margin-top: 36px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(188, 213, 255, 0.14);
  box-shadow: 0 18px 38px rgba(7, 11, 18, 0.24);
}

.auth-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.auth-stat-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(236, 208, 188, 0.88);
  background: linear-gradient(180deg, rgba(255, 250, 246, 0.95), rgba(252, 245, 239, 0.72));
  box-shadow: 0 14px 26px rgba(21, 16, 12, 0.06);
}

.auth-stat-card span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #ac6240;
}

.auth-stat-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
  color: #20140f;
}

.auth-panel-copy-hero h2 {
  margin: 0 0 10px;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.auth-panel-copy-hero p {
  max-width: 48ch;
  font-size: 15px;
}

.auth-page-links {
  display: flex;
  gap: 18px;
  margin-top: 18px;
}

.auth-page-links a {
  color: #a4431e;
  text-decoration: none;
  font-weight: 600;
}

.auth-page-links a:hover {
  text-decoration: underline;
}

.welcome-chip {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.welcome-title {
  margin: 26px 0 8px;
  font-size: clamp(48px, 8vw, 82px);
  line-height: 0.95;
}

.welcome-subtitle {
  margin: 0 0 22px;
  color: #ffceb7;
  font-size: 18px;
}

.welcome-board {
  position: relative;
  max-width: 420px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.welcome-board p {
  margin: 0;
  position: relative;
  z-index: 1;
  font-size: 16px;
}

.welcome-board-glow {
  position: absolute;
  inset: -35%;
  background: radial-gradient(circle, rgba(255, 181, 45, 0.18) 0%, transparent 50%);
  animation: pulseSpin 7s linear infinite;
}

.scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
  background-size: 100% 10px;
  opacity: 0.22;
  pointer-events: none;
}

.floating-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  animation: drift 6s ease-in-out infinite;
}

.orb-a {
  width: 150px;
  height: 150px;
  right: 34px;
  top: 90px;
  background: rgba(255, 181, 45, 0.18);
}

.orb-b {
  width: 220px;
  height: 220px;
  right: 80px;
  bottom: 60px;
  background: rgba(255, 107, 45, 0.14);
  animation-delay: -2s;
}

.login-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-stack-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
}

.login-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--border);
  padding: 26px;
  border-radius: 22px;
  box-shadow: 0 20px 36px var(--shadow);
  backdrop-filter: blur(10px);
}

.brand-tight {
  margin-bottom: 16px;
}

.gate-card {
  animation: fadeIn 0.5s ease;
}

.request-card {
  animation: fadeIn 0.7s ease;
}

.gate-card-wide {
  position: relative;
  overflow: hidden;
}

.gate-card-wide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(255, 181, 45, 0.14), transparent 22%);
  pointer-events: none;
}

.login-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.gate-badge-grid {
  display: grid;
  gap: 10px;
  min-width: 180px;
}

.gate-badge {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid #ffd6bf;
  background: rgba(255, 245, 237, 0.8);
  box-shadow: 0 10px 18px rgba(28, 23, 17, 0.05);
}

.gate-badge span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #a4431e;
}

.gate-badge strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.login-form-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: start;
}

.gate-side-note {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #ffd8c4;
  background: linear-gradient(180deg, #fff7ef, #fdf1e8);
  box-shadow: 0 12px 22px rgba(28, 23, 17, 0.05);
}

.gate-side-note h3 {
  margin: 0 0 10px;
}

.gate-side-note p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.gate-side-note a {
  color: #a4431e;
  text-decoration: none;
}

.gate-side-note a:hover {
  text-decoration: underline;
}

.login-meta {
  margin-top: 14px;
  font-size: 14px;
}

.login-meta a {
  color: #a4431e;
  text-decoration: none;
}

.login-meta a:hover {
  text-decoration: underline;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.login-card h1,
.login-card h2 {
  margin-top: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes staggerReveal {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes panelRise {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shaderShift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, -1%, 0) scale(1.04); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.02); }
}

@keyframes boardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulseSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -12px, 0); }
}

@keyframes shineSweep {
  0% { transform: translateX(-120%); }
  45%, 100% { transform: translateX(120%); }
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: flex; gap: 10px; overflow: auto; }
  .sidebar-head, .sidebar-foot { display: none; }
  .nav-btn { white-space: nowrap; }
  .split { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-metrics { width: 100%; flex-wrap: wrap; }
  .login-layout,
  .login-layout-v2 { grid-template-columns: 1fr; }
  .welcome-stage { min-height: 520px; }
  .hero-rive-shell { width: 100%; min-width: 0; height: 180px; }
  .landing-stage { min-height: 620px; padding: 28px; }
  .landing-actions { flex-direction: column; align-items: flex-start; }
  .landing-entry-grid { grid-template-columns: 1fr; }
  .login-card-head,
  .login-form-shell { grid-template-columns: 1fr; display: grid; }
  .auth-shell-head { grid-template-columns: 1fr; display: grid; }
  .auth-stat-row { grid-template-columns: 1fr; }
  .auth-single-layout { grid-template-columns: 1fr; }
  .welcome-stage-footer { grid-template-columns: 1fr; }
  .desktop-stage { min-height: 420px; height: 62vh; }
  .admin-policy-bar { grid-template-columns: 1fr; }
}
