:root {
  --bg-1: #050b15;
  --bg-2: #081221;
  --bg-3: #0b1730;
  --panel: rgba(8, 15, 29, 0.82);
  --panel-strong: rgba(10, 18, 34, 0.94);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #edf4ff;
  --muted: #9aabc7;
  --line: rgba(142, 191, 255, 0.07);
  --cyan: rgba(34, 211, 238, 0.16);
  --blue: rgba(59, 130, 246, 0.16);
  --violet: rgba(99, 102, 241, 0.10);
  --danger: #ff8b99;
  --warning: #ffd978;
  --success: #7cf0be;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, var(--cyan), transparent 28%),
    radial-gradient(circle at 82% 16%, var(--blue), transparent 30%),
    radial-gradient(circle at 55% 100%, var(--violet), transparent 22%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 48%, var(--bg-3) 100%);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.page-shell { position: relative; min-height: 100vh; overflow: hidden; }
.page-bg, .page-grid, .page-glow { position: fixed; inset: 0; pointer-events: none; }
.page-grid {
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, rgba(0,0,0,.92), rgba(0,0,0,.54));
}
.page-glow-cyan { background: radial-gradient(circle at 16% 18%, var(--cyan), transparent 34%); }
.page-glow-blue { background: radial-gradient(circle at 84% 12%, var(--blue), transparent 34%), radial-gradient(circle at 60% 86%, var(--violet), transparent 24%); }
.page-content { position: relative; z-index: 2; min-height: 100vh; padding: 88px 20px 48px; }
.topbar {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 4;
  display: flex;
  gap: 10px;
  align-items: center;
}
.topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(8, 15, 28, 0.7);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
  color: #dce9ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
}
.topbar form { margin: 0; }
.hero-wrap, .center-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 30px;
  align-items: center;
}
.hero-wrap {
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 500px);
  min-height: calc(100vh - 128px);
}
.center-wrap { justify-items: center; min-height: calc(100vh - 128px); padding-block: 12px; }
.narrow-wrap { max-width: 760px; }
.hero-copy { max-width: 640px; }
.eyebrow {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(104, 169, 255, .18);
  background: rgba(10, 22, 42, .58);
  color: #8ed8ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.hero-text {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  max-width: 560px;
}
.glass-card {
  background: linear-gradient(180deg, rgba(11, 20, 38, 0.92), rgba(8, 15, 29, 0.86));
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(18px);

  transform: translateY(0) scale(1);
  opacity: 1;
  transition: transform .34s ease, opacity .34s ease, box-shadow .25s ease, width .25s ease, padding .25s ease;
}
.form-card { width: 100%; max-width: 560px; padding: 34px; }
.form-card h1 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 20px; }
.form-stack { display: grid; gap: 16px; }
.field { display: grid; gap: 10px; }
.field label, .summary-row-label { color: #d8e5fa; font-size: 14px; font-weight: 600; }
.field input, .field select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 15px 16px;
  outline: none;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.field input::placeholder { color: #6f829f; }
.field input:focus, .field select:focus {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .12);
}
.field-error { margin: -2px 0 0; color: var(--danger); font-size: 13px; }

.card-gap { margin-top: 18px; }
.card-gap-sm { margin-top: 14px; }
.alert {
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.7;
  border: 1px solid transparent;
}
.alert-danger { background: rgba(127, 29, 29, .22); border-color: rgba(248, 113, 113, .24); color: #fecaca; }
.alert-warning { background: rgba(120, 87, 18, .18); border-color: rgba(250, 204, 21, .24); color: #fde68a; }
.alert-success { background: rgba(6, 78, 59, .2); border-color: rgba(16, 185, 129, .22); color: #bbf7d0; }
.summary-box {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(18, 28, 50, .72), rgba(13, 20, 38, .72));
  border: 1px solid rgba(255,255,255,.06);
}
.summary-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.summary-row + .summary-row {
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.summary-row-value {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 700;
  color: #edf4ff;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .01em;
}
.checkbox-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 2px;
}
.checkbox-line input {
  width: 18px;
  height: 18px;
  accent-color: #38bdf8;
  margin-top: 2px;
  flex: 0 0 auto;
}
.button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.single-row { grid-template-columns: 1fr; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-full { width: 100%; }
.btn-primary {
  color: #08111f;
  background: linear-gradient(135deg, #67e8f9 0%, #60a5fa 55%, #818cf8 100%);
  box-shadow: 0 10px 28px rgba(56, 189, 248, .22);
}
.btn-secondary {
  color: #dce8ff;
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.09);
}
.promo-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  overflow: hidden;
  z-index: 5;
  width: min(360px, calc(100vw - 28px));
  padding: 16px 16px 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(103, 232, 249, .16);
  background: linear-gradient(180deg, rgba(7, 18, 33, .92), rgba(10, 20, 40, .9));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(18px);
  transform: translateY(0) scale(1);
  opacity: 1;
  transition: transform .38s ease, opacity .38s ease, box-shadow .25s ease;
}
.promo-banner::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(103,232,249,.18), rgba(96,165,250,.06), rgba(129,140,248,.18));
  z-index: -1;
  opacity: .55;
}
.promo-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: #8ed8ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.promo-title {
  margin: 0 0 8px;
  padding-right: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
  color: #eef5ff;
}
.promo-text {
  margin: 0 0 14px;
  color: #9fb1ce;
  font-size: 13px;
  line-height: 1.55;
}
.promo-cta {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #67e8f9 0%, #60a5fa 55%, #818cf8 100%);
  color: #07111e;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .01em;
  box-shadow: 0 10px 24px rgba(56,189,248,.2);
}

.promo-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: #dce8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.promo-hidden {
  opacity: 0;
  transform: translateY(18px) scale(.98);
  pointer-events: none;
}
.promo-removed {
  opacity: 0;
  transform: translateY(14px) scale(.98);
}
.btn:focus-visible, .topbar-link:focus-visible, .clean-link:focus-visible, .promo-close:focus-visible {
  outline: 2px solid rgba(103, 232, 249, .7);
  outline-offset: 2px;
}
.clean-link { color: #8ed8ff; text-decoration: underline; text-underline-offset: 3px; }
.admin-shell { width: 100%; }
.admin-wrap { max-width: 1280px; }
.admin-card { width: 100%; padding: 28px; }
.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.admin-header-row h1 { margin: 10px 0 0; font-size: 34px; }
.admin-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 20px;
}
.small-field { max-width: 220px; }
.admin-buttons { grid-template-columns: repeat(2, auto); }
.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(7, 13, 26, .5);
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 14px 12px; border-bottom: 1px solid rgba(255,255,255,.05); text-align: left; }
.admin-table th { color: #9eb2ce; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.03); }
.break-cell { max-width: 260px; word-break: break-word; }
.pagination-wrap { margin-top: 18px; }
@media (max-width: 980px) {
  .hero-wrap { grid-template-columns: 1fr; min-height: auto; padding-top: 18px; }
  .hero-copy { max-width: none; }
}
@media (max-width: 720px) {
  .page-content { padding: 84px 14px 120px; }
  .form-card, .admin-card { padding: 20px; border-radius: 22px; }
  .button-row, .admin-filters { grid-template-columns: 1fr; }
  .small-field { max-width: none; }
  .summary-row { grid-template-columns: 1fr; }
  .topbar { top: 12px; right: 12px; }
  .btn { white-space: normal; min-height: 54px; padding: 14px 16px; }
  .promo-banner { right: 14px; bottom: 14px; width: calc(100vw - 28px); }
  .promo-title { font-size: 15px; }
}



@media (max-width: 700px) {
  .form-card { padding: 28px 20px; }
  .summary-row { grid-template-columns: 1fr; gap: 6px; }
  .button-row { grid-template-columns: 1fr; gap: 10px; }
  .promo-banner { left: 14px; right: 14px; bottom: 14px; width: auto; }
}

.promo-hidden {
  opacity: 0;
  transform: translateY(24px) scale(.98);
}

.promo-cta { white-space: nowrap; }

@media (max-width: 900px) {
  .hero-wrap {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 20px;
  }
  .hero-copy { max-width: 100%; }
  .form-card { max-width: 100%; }
}
@media (max-width: 640px) {
  .page-content { padding: 74px 14px 34px; }
  .topbar { top: 14px; right: 14px; gap: 8px; }
  .topbar-link { min-width: 48px; height: 40px; padding: 0 12px; border-radius: 13px; }
  .form-card { padding: 22px 16px; border-radius: 22px; }
  h1 { font-size: 32px; }
  .hero-text { font-size: 16px; line-height: 1.6; }
  .summary-row { grid-template-columns: 1fr; gap: 8px; }
  .button-row { grid-template-columns: 1fr; }
  .promo-banner {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    padding: 14px;
    border-radius: 18px;
  }
  .promo-title { padding-right: 28px; font-size: 15px; }
  .promo-text { font-size: 12px; margin-bottom: 12px; }
  .promo-cta { min-height: 42px; font-size: 13px; }
  .promo-close { top: 10px; right: 10px; width: 28px; height: 28px; }
}

.promo-reopen {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 6;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, .22);
  background: rgba(7, 18, 33, .9);
  color: #dce8ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: transform .25s ease, opacity .25s ease, box-shadow .25s ease;
}
.promo-reopen:hover { transform: translateY(-1px); }
.promo-reopen-hidden {
  opacity: 0;
  transform: translateY(14px) scale(.98);
  pointer-events: none;
}
@media (max-width: 640px) {
  .promo-reopen {
    right: 14px;
    bottom: 14px;
    min-height: 40px;
    padding: 0 14px;
    font-size: 12px;
  }
}
