:root {
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
  --void: #03040a;
  --abyss: #060a14;
  --depth: #0a1220;
  --ridge: #101c32;
  --crest: #1a2d4a;
  --mist: #dcd7cd;
  --mist-dim: rgba(220, 215, 205, 0.55);
  --glow: rgba(120, 170, 255, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--mist-dim);
  background: radial-gradient(1200px 800px at 10% -10%, rgba(26, 45, 74, 0.45), transparent 60%),
    radial-gradient(900px 700px at 90% 0%, rgba(16, 28, 50, 0.55), transparent 55%),
    linear-gradient(165deg, var(--void), var(--abyss) 42%, var(--depth) 72%, #05070f);
  font-family: Cambria, "Palatino Linotype", Palatino, "Times New Roman", Times, serif;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  background: repeating-linear-gradient(
      105deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 7px
    ),
    radial-gradient(ellipse at 30% 40%, rgba(80, 120, 200, 0.08), transparent 55%);
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 0;
  animation: veilDrift 38s var(--ease-smooth) infinite alternate;
}

@keyframes veilDrift {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(-2%, 1.5%, 0) rotate(1.2deg);
  }
}

a {
  color: var(--mist);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.35s var(--ease-smooth), opacity 0.35s var(--ease-smooth);
}

a:hover {
  color: #f2efe6;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 22px 72px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
  background: linear-gradient(135deg, rgba(16, 28, 50, 0.65), rgba(6, 10, 20, 0.82));
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 18px 44px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  object-fit: cover;
}

.brand strong {
  display: block;
  color: rgba(242, 239, 230, 0.92);
  letter-spacing: 0.18em;
  font-size: 13px;
  text-transform: uppercase;
}

.brand span {
  display: block;
  font-size: 12px;
  color: var(--mist-dim);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.inline-logout {
  display: inline;
  margin: 0;
  padding: 0;
}

.inline-logout .btn {
  margin: 0;
}

nav a {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero {
  margin-top: 48px;
  padding: 48px 30px 56px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: radial-gradient(700px 420px at 20% 20%, rgba(120, 170, 255, 0.1), transparent 60%),
    linear-gradient(145deg, rgba(10, 18, 32, 0.92), rgba(4, 5, 10, 0.96));
  clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 10% -20% -30% -20%;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 55%);
  opacity: 0.35;
  pointer-events: none;
}

.hero h1 {
  position: relative;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  color: rgba(242, 239, 230, 0.94);
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.hero p {
  position: relative;
  margin: 0 0 28px;
  max-width: 62ch;
  font-size: 17px;
}

.cta-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(16, 28, 50, 0.55);
  color: rgba(242, 239, 230, 0.95);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  cursor: pointer;
  transition: transform 0.45s var(--ease-reveal), border-color 0.45s var(--ease-smooth),
    background 0.45s var(--ease-smooth), box-shadow 0.45s var(--ease-smooth);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(120, 170, 255, 0.12);
}

.btn-primary {
  background: linear-gradient(120deg, rgba(26, 45, 74, 0.95), rgba(10, 18, 32, 0.95));
}

.panel {
  margin-top: 40px;
  padding: 28px 26px 32px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 28px 18px 32px 22px / 22px 28px 18px 30px;
  background: rgba(6, 10, 20, 0.72);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.panel h2 {
  margin: 0 0 18px;
  font-size: 22px;
  color: rgba(242, 239, 230, 0.9);
  letter-spacing: -0.02em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px 22px;
}

label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(220, 215, 205, 0.55);
  margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"] {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px 10px 16px 12px / 12px 16px 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 5, 10, 0.65);
  color: rgba(242, 239, 230, 0.92);
  font-size: 15px;
}

input:focus {
  outline: 2px solid rgba(120, 170, 255, 0.35);
  outline-offset: 2px;
}

.hint {
  font-size: 12px;
  color: rgba(220, 215, 205, 0.45);
  margin-top: 6px;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.captcha-row img {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  height: 56px;
}

.toast {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 28, 50, 0.55);
  color: rgba(242, 239, 230, 0.9);
  display: none;
}

.toast[data-visible="true"] {
  display: block;
}

.toast[data-tone="error"] {
  border-color: rgba(255, 120, 120, 0.35);
}

.toast[data-tone="success"] {
  border-color: rgba(120, 220, 180, 0.35);
}

.status-line {
  margin-top: 22px;
  font-size: 13px;
  color: rgba(220, 215, 205, 0.45);
}

.wave-divider {
  margin-top: 48px;
  height: 64px;
  background: linear-gradient(90deg, transparent, rgba(120, 170, 255, 0.12), transparent);
  clip-path: polygon(0 40%, 12% 32%, 24% 44%, 38% 28%, 52% 46%, 66% 30%, 80% 42%, 92% 34%, 100% 40%, 100% 100%, 0 100%);
  opacity: 0.55;
}

.hidden {
  display: none !important;
}

code.uri {
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 5, 10, 0.65);
  color: rgba(242, 239, 230, 0.85);
  font-size: 12px;
  word-break: break-all;
}

@media (max-width: 720px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
  }
  nav ul {
    justify-content: flex-start;
  }
}
