:root {
  --bg0: #070b10;
  --bg1: #0f1620;
  --bg2: #172233;
  --line: #2a3a4f;
  --text: #eef3fa;
  --muted: #8fa0b6;
  --accent: #2fe0c5;
  --accent2: #ffb020;
  --danger: #ff5d7a;
  --ok: #35d59a;
  --info: #5aa7ff;
  --radius: 14px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --display: "Syne", "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: linear-gradient(165deg, #05080c 0%, #0b121a 45%, #081018 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: .35;
  animation: floatOrb 14s ease-in-out infinite alternate;
}
.bg-orb-a {
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, rgba(47,224,197,.45), transparent 70%);
}
.bg-orb-b {
  right: -10%;
  bottom: -15%;
  background: radial-gradient(circle, rgba(255,176,32,.28), transparent 70%);
  animation-delay: -4s;
}
@keyframes floatOrb {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(4%, 6%, 0) scale(1.12); }
}

.app-shell, .auth-page { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  background: rgba(12,18,28,.82);
  border-right: 1px solid var(--line);
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  backdrop-filter: blur(14px);
  animation: slideIn .45s ease both;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}
.brand {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: .03em;
  margin: 0 0 1.6rem;
}
.brand span { color: var(--accent); }
.nav a {
  display: block;
  padding: .72rem .95rem;
  border-radius: 10px;
  color: var(--muted);
  margin-bottom: .28rem;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .18s ease, box-shadow .2s ease;
}
.nav a:hover, .nav a.active {
  background: linear-gradient(90deg, rgba(47,224,197,.14), rgba(47,224,197,.02));
  color: var(--text);
  transform: translateX(3px);
  box-shadow: inset 3px 0 0 var(--accent);
  text-decoration: none;
}
.nav .meta {
  margin-top: 2rem;
  padding: .95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .85rem;
  background: rgba(255,255,255,.02);
}

.main { padding: 1.6rem 2rem 3rem; }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
  animation: rise .4s ease both;
}
.page-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.page-head p { margin: .4rem 0 0; color: var(--muted); }

.grid { display: grid; gap: 1rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.stat, .panel {
  background: rgba(15,22,32,.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  backdrop-filter: blur(10px);
  transition: transform .2s ease, border-color .2s ease, box-shadow .25s ease;
}
.stat:hover, .panel:hover {
  border-color: rgba(47,224,197,.35);
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.stat .label { color: var(--muted); font-size: .85rem; }
.stat .value {
  font-size: 1.9rem;
  font-family: var(--display);
  font-weight: 800;
  margin-top: .35rem;
}
.stat .hint { color: var(--muted); font-size: .8rem; margin-top: .25rem; }

.reveal, .stat, .panel, .flash {
  animation: rise .45s ease both;
}
.stat:nth-child(2) { animation-delay: .05s; }
.stat:nth-child(3) { animation-delay: .1s; }
.stat:nth-child(4) { animation-delay: .15s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #2fe0c5, #1fb89f);
  color: #04221e;
  font-weight: 700;
  padding: .68rem 1.05rem;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, filter .15s ease, box-shadow .2s ease;
  box-shadow: 0 8px 24px rgba(47,224,197,.22);
}
.btn:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  text-decoration: none;
  color: #04221e;
}
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
  box-shadow: none;
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.btn-danger {
  background: linear-gradient(135deg, #ff5d7a, #e23d5c);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255,93,122,.22);
}
.btn-sm { padding: .4rem .7rem; font-size: .85rem; }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: .78rem .6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: .92rem;
}
th {
  color: var(--muted);
  font-weight: 650;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
tr { transition: background .15s ease; }
tr:hover td { background: rgba(255,255,255,.025); }

.form-row { margin-bottom: 1rem; }
label { display: block; margin-bottom: .4rem; color: var(--muted); font-size: .88rem; }
input, select, textarea {
  width: 100%;
  background: rgba(7,11,16,.9);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: .72rem .85rem;
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47,224,197,.16);
}
.help { color: var(--muted); font-size: .8rem; margin-top: .35rem; }

.badge {
  display: inline-block;
  padding: .22rem .58rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
.badge-ok { background: rgba(53,213,154,.15); color: var(--ok); }
.badge-err { background: rgba(255,93,122,.15); color: var(--danger); }
.badge-info { background: rgba(90,167,255,.15); color: var(--info); }
.badge-warn { background: rgba(255,176,32,.15); color: var(--accent2); }
.badge-mute { background: rgba(143,160,182,.15); color: var(--muted); }

.flash-wrap { margin-bottom: 1rem; }
.flash {
  padding: .85rem 1rem;
  border-radius: 10px;
  margin-bottom: .5rem;
  border: 1px solid var(--line);
}
.flash-success { background: rgba(53,213,154,.12); border-color: rgba(53,213,154,.35); }
.flash-error { background: rgba(255,93,122,.12); border-color: rgba(255,93,122,.35); }
.flash-info { background: rgba(90,167,255,.12); border-color: rgba(90,167,255,.35); }

.actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; word-break: break-all; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}
.auth-card {
  width: min(440px, 100%);
  background: rgba(15,22,32,.88);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2.1rem;
  box-shadow: 0 30px 90px rgba(0,0,0,.45);
  animation: authIn .55s cubic-bezier(.2,.8,.2,1) both;
  backdrop-filter: blur(16px);
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.auth-card h1 {
  margin: 0;
  font-size: 2.4rem;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: .02em;
}
.auth-card h1 span { color: var(--accent); }
.auth-card .tagline {
  color: var(--muted);
  margin: .55rem 0 1.55rem;
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .grid-4, .grid-2 { grid-template-columns: 1fr 1fr; }
  .main { padding: 1rem; }
}
@media (max-width: 640px) {
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: start; }
}

.btn:disabled,
button:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
  box-shadow: none !important;
}
.btn-pulse {
  animation: pulseGlow 1.8s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 8px 24px rgba(47,224,197,.22); }
  50% { box-shadow: 0 8px 36px rgba(47,224,197,.55); }
}
.posting-box {
  border-color: rgba(47,224,197,.35);
  background: linear-gradient(135deg, rgba(47,224,197,.08), rgba(15,22,32,.85));
}
.posting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.posting-hero {
  border-color: rgba(47,224,197,.4);
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(47,224,197,.12), transparent 60%),
    rgba(15,22,32,.85);
}
.choice {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: .65rem;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.choice:hover { border-color: rgba(47,224,197,.45); transform: translateY(-1px); }
.choice.is-on {
  border-color: rgba(47,224,197,.55);
  background: rgba(47,224,197,.08);
}
.choice input { margin-top: .25rem; }
.pick-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: .7rem;
  align-items: center;
  padding: .55rem .3rem;
  border-bottom: 1px solid rgba(42,58,79,.6);
}
.pick-row:last-child { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
