@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

:root {
  --bg: #080808;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .03);
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .13);

  --text: rgba(255, 255, 255, .93);
  --text-muted: rgba(255, 255, 255, .55);
  --text-faint: rgba(255, 255, 255, .32);

  --red: #e10613;
  --red-bright: #ff2030;
  --red-dim: rgba(225, 6, 19, .5);
  --red-glow: rgba(225, 6, 19, .2);
  --red-subtle: rgba(225, 6, 19, .08);

  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Background ──────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.orb-1 {
  width: 640px; height: 640px;
  top: -220px; left: -160px;
  background: radial-gradient(circle, rgba(225, 6, 19, .3), transparent 65%);
  animation: drift1 20s ease-in-out infinite;
}

.orb-2 {
  width: 520px; height: 520px;
  top: 30%; right: -130px;
  background: radial-gradient(circle, rgba(225, 6, 19, .15), transparent 65%);
  animation: drift2 26s ease-in-out infinite;
}

.orb-3 {
  width: 420px; height: 420px;
  bottom: -80px; left: 30%;
  background: radial-gradient(circle, rgba(225, 6, 19, .10), transparent 65%);
  animation: drift3 30s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0); }
  40%       { transform: translate(50px, 40px); }
  70%       { transform: translate(-20px, 60px); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0); }
  35%       { transform: translate(-40px, -50px); }
  65%       { transform: translate(25px, -25px); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0); }
  45%       { transform: translate(60px, -35px); }
  75%       { transform: translate(-40px, 20px); }
}

/* ── Top bar ─────────────────────────────────── */
.topbar {
  position: relative;
  z-index: 10;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-wrap {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px var(--red-glow), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.logo {
  width: 36px; height: 36px;
  object-fit: contain;
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.3px;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Layout ──────────────────────────────────── */
.layout {
  position: relative;
  z-index: 10;
  max-width: 1120px;
  margin: 24px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 20px;
  align-items: start;
}

/* ── Card ────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 32px 80px rgba(0, 0, 0, .65),
    0 0 0 1px rgba(0, 0, 0, .45);
  position: relative;
  overflow: hidden;
}

/* red shimmer line on top of every card */
.card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(225, 6, 19, .7) 45%, rgba(225, 6, 19, .7) 55%, transparent 95%);
  pointer-events: none;
}

/* ── Form card ───────────────────────────────── */
.form-card {
  padding: 30px;
}

.card-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.2;
}

.subtext {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 30%, var(--border-strong) 70%, transparent);
  margin: 24px 0;
}

/* ── Form ────────────────────────────────────── */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, .72);
  letter-spacing: .15px;
}

.field label svg { opacity: .6; }

.field input,
.field textarea {
  width: 100%;
  background: rgba(0, 0, 0, .45);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-faint);
}

.field textarea {
  resize: vertical;
  min-height: 135px;
  line-height: 1.6;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--red-dim);
  box-shadow: 0 0 0 3px var(--red-subtle), 0 0 0 1px var(--red-dim);
}

.hint {
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.4;
}

/* ── Actions ─────────────────────────────────── */
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:active { transform: translateY(1px); }

.btn-sm {
  padding: 8px 13px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-primary {
  background: linear-gradient(160deg, var(--red-bright), var(--red));
  color: #fff;
  border-color: rgba(255, 255, 255, .12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 8px 32px rgba(225, 6, 19, .38);
}

.btn-primary:hover:not(:disabled) {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    0 14px 44px rgba(225, 6, 19, .5);
  filter: brightness(1.06);
}

.btn-primary:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, .05);
  border-color: var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(225, 6, 19, .35);
  color: var(--text);
}

/* ── Spinner ─────────────────────────────────── */
.spinner {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .28);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn.is-loading .btn-icon { display: none; }

/* ── Status ──────────────────────────────────── */
.status {
  display: none;
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid var(--border);
  background: var(--surface-2);
  animation: fadeUp .22s ease;
}

.status.success {
  border-color: rgba(34, 197, 94, .3);
  background: rgba(34, 197, 94, .08);
  color: rgba(134, 239, 172, .92);
}

.status.error {
  border-color: rgba(239, 68, 68, .3);
  background: rgba(239, 68, 68, .08);
  color: rgba(252, 165, 165, .92);
}

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

/* ── Chip ────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--warn);
  flex-shrink: 0;
  transition: background .3s, box-shadow .3s;
}

.chip-ok   .dot  { background: var(--ok);   box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.chip-ok   .chip-label { color: var(--text); }
.chip-warn .dot  { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }
.chip-bad  .dot  { background: var(--bad);  box-shadow: 0 0 0 3px rgba(239, 68, 68, .18); }
.chip-bad  .chip-label { color: var(--text); }

/* ── Sidebar ─────────────────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel {
  padding: 22px;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.panel-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1px;
}

.icon-red { color: var(--red); }

/* ── Info list ───────────────────────────────── */
.info-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.info-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(0, 0, 0, .32);
  border: 1px solid rgba(255, 255, 255, .055);
}

.info-key {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, .68);
  flex-shrink: 0;
}

.info-val {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

.badge-warn {
  background: rgba(245, 158, 11, .1);
  color: rgba(253, 230, 138, .88);
  border-radius: 6px;
  padding: 2px 8px;
  border: 1px solid rgba(245, 158, 11, .22);
  font-size: 11.5px;
  font-weight: 600;
}

.code-badge {
  font-family: "JetBrains Mono", "Fira Code", "SF Mono", ui-monospace, monospace;
  font-size: 11px;
  background: rgba(225, 6, 19, .1);
  color: rgba(255, 150, 155, .88);
  border: 1px solid rgba(225, 6, 19, .22);
  border-radius: 6px;
  padding: 2px 7px;
}

/* ── Tip panel ───────────────────────────────── */
.panel-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
}

.panel-tip svg { flex-shrink: 0; margin-top: 1px; }

.panel-tip p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Footer ──────────────────────────────────── */
.footer {
  position: relative;
  z-index: 10;
  max-width: 1120px;
  margin: 22px auto 30px;
  padding: 0 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}

.footer .sep { margin: 0 7px; }

.footer-brand {
  color: var(--red);
  font-weight: 600;
}

/* ── Lucide sizing ───────────────────────────── */
.ico-sm  { width: 14px; height: 14px; stroke-width: 2.2; }
.ico-xs  { width: 12px; height: 12px; stroke-width: 2.2; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
  }

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

  h1 { font-size: 22px; }

  .topbar { padding: 18px 16px 0; }
  .layout { padding: 0 16px; margin-top: 18px; }
  .footer { padding: 0 16px; }
}
