:root {
  --bg: #070812;
  --panel: rgba(17, 20, 36, 0.86);
  --panel-strong: #111426;
  --ink: #f8fbff;
  --muted: #aeb6ca;
  --line: rgba(255, 255, 255, 0.12);
  --hot: #ff2d75;
  --cyan: #22f4ff;
  --violet: #845cff;
  --green: #23d18b;
  --danger: #ff6678;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 45, 117, 0.34), transparent 28%),
    radial-gradient(circle at 88% 4%, rgba(34, 244, 255, 0.28), transparent 26%),
    linear-gradient(145deg, #070812 0%, #121426 58%, #070812 100%);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-shell,
.panel-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

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

.auth-card,
.form-card,
.upload-card,
.stats-grid article,
.panel-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.auth-card {
  width: min(100%, 520px);
  padding: clamp(26px, 5vw, 44px);
}

.eyebrow {
  width: fit-content;
  margin: 0 0 14px;
  padding: 8px 12px;
  border: 1px solid rgba(34, 244, 255, 0.36);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 244, 255, 0.07);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.98;
}

h2 {
  font-size: 1.35rem;
}

.muted {
  color: var(--muted);
  line-height: 1.7;
}

.small {
  font-size: 0.94rem;
}

.small a {
  color: var(--cyan);
  font-weight: 800;
}

.actions,
.form-stack {
  display: grid;
  gap: 14px;
}

.actions {
  grid-template-columns: 1fr 1fr;
  margin-top: 26px;
}

.button,
.link-button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.primary {
  color: #061018;
  background: linear-gradient(135deg, var(--cyan), var(--hot));
  box-shadow: 0 0 28px rgba(34, 244, 255, 0.18);
}

.ghost {
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

label {
  display: grid;
  gap: 8px;
  color: #e9edf8;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(6, 8, 18, 0.78);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(34, 244, 255, 0.35);
  border-color: rgba(34, 244, 255, 0.68);
}

.status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.status[data-type="success"] {
  color: var(--green);
}

.status[data-type="error"] {
  color: var(--danger);
}

.topbar {
  width: min(1180px, calc(100% - 28px));
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
}

.brand {
  color: var(--ink);
  font-weight: 900;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-weight: 700;
}

.link-button {
  min-height: auto;
  padding: 0;
  color: var(--cyan);
  background: transparent;
}

.panel-shell {
  padding: 18px 0 42px;
}

.panel-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 5vw, 38px);
}

.panel-hero.compact {
  margin-bottom: 18px;
}

.panel-hero h1 {
  max-width: 700px;
}

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

.stats-grid article {
  min-height: 128px;
  padding: 22px;
}

.stats-grid span {
  display: block;
  margin-bottom: 16px;
  color: var(--muted);
}

.stats-grid strong {
  overflow-wrap: anywhere;
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
}

.form-card,
.upload-card {
  padding: clamp(20px, 4vw, 30px);
}

.upload-card {
  display: grid;
  align-content: start;
  gap: 16px;
}

.upload-card .button {
  width: 100%;
}

@media (max-width: 820px) {
  .panel-hero,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-hero .button {
    width: 100%;
  }

  .stats-grid,
  .editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .auth-shell,
  .panel-shell {
    width: min(100% - 22px, 1120px);
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .topbar nav {
    width: 100%;
    justify-content: space-between;
  }
}
