@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Exo+2:ital,wght@0,300;0,400;0,500;0,600;1,300&display=swap');

:root {
  --bg: #08090d;
  --surface: #0e1018;
  --surface2: #141721;
  --border: #1e2235;
  --accent: #00e5ff;
  --accent2: #7c3aed;
  --accent3: #f59e0b;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --danger: #ef4444;
  --success: #10b981;
  --radius: 8px;
  --font-head: 'Rajdhani', sans-serif;
  --font-body: 'Exo 2', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0,229,255,0.06), transparent),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(124,58,237,0.05), transparent);
}

/* ── HEADER ── */
.site-header {
  background: linear-gradient(135deg, #0a0c14 0%, #0e1220 100%);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-badge .logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-head);
  color: #fff;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.logo-text { line-height: 1.2; }
.logo-text .brand { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--accent); letter-spacing: 1px; }
.logo-text .sub { font-size: 11px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; }
.header-divider { flex: 1; height: 1px; background: var(--border); }
.form-indicator { font-family: var(--font-head); font-size: 13px; color: var(--text-muted); text-align: right; letter-spacing: 1px; }
.form-indicator strong { display: block; font-size: 15px; color: var(--text); }

/* ── MAIN LAYOUT ── */
.main-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── FORM HERO ── */
.form-hero {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.form-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-family: var(--font-head);
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.form-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
.form-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.form-hero h1 span { color: var(--accent); }
.form-hero p { color: var(--text-muted); font-size: 14px; max-width: 600px; }

/* ── SECTION CARD ── */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.section-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}
.section-card:focus-within::before { opacity: 1; }
.section-card:focus-within { border-color: rgba(0,229,255,0.25); }

.section-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title .section-num {
  width: 26px; height: 26px;
  background: rgba(0,229,255,0.1);
  border: 1px solid rgba(0,229,255,0.25);
  border-radius: 6px;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-family: var(--font-head);
  flex-shrink: 0;
}

/* ── GRID ── */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-grid.col-1 { grid-template-columns: 1fr; }
.field-grid.col-3 { grid-template-columns: 1fr 1fr 1fr; }
@media(max-width:640px) { .field-grid, .field-grid.col-3 { grid-template-columns: 1fr; } }

/* ── FIELD ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field.span-2 { grid-column: span 2; }
@media(max-width:640px) { .field.span-2 { grid-column: span 1; } }

label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}
label .req { color: var(--accent); margin-left: 2px; }
label .opt { color: var(--text-muted); font-size: 10px; font-style: italic; text-transform: none; letter-spacing: 0; margin-left: 4px; }

input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number],
select, textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,229,255,0.1);
  background: #131622;
}
input::placeholder, textarea::placeholder { color: #3a4156; }
textarea { resize: vertical; min-height: 100px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }
select option { background: #0e1018; }

/* ── FILE UPLOAD ── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(0,229,255,0.04);
}
.upload-zone input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
  border: none; padding: 0; background: transparent;
}
.upload-zone .upload-icon { font-size: 28px; margin-bottom: 8px; }
.upload-zone .upload-label { font-size: 13px; color: var(--text-muted); }
.upload-zone .upload-label strong { color: var(--accent); }
.upload-zone .upload-hint { font-size: 11px; color: #3a4156; margin-top: 4px; }
.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-item {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,229,255,0.06);
  border: 1px solid rgba(0,229,255,0.15);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text);
}
.file-item .remove-file { margin-left: auto; cursor: pointer; color: var(--text-muted); font-size: 16px; line-height: 1; }
.file-item .remove-file:hover { color: var(--danger); }

/* ── CHECKBOX / RADIO GROUPS ── */
.check-group, .radio-group { display: flex; flex-direction: column; gap: 8px; }
.check-row, .radio-row {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s;
}
.check-row:hover, .radio-row:hover { border-color: rgba(0,229,255,0.3); background: #131622; }
.check-row input, .radio-row input { display: none; }
.check-row .custom-check, .radio-row .custom-radio {
  width: 18px; height: 18px; border: 1.5px solid var(--border); border-radius: 4px;
  flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.radio-row .custom-radio { border-radius: 50%; }
.check-row input:checked ~ .check-label .custom-check,
.check-row.checked .custom-check {
  background: var(--accent); border-color: var(--accent); color: #000;
}
.check-row input:checked + .custom-check,
.check-row.checked .custom-check { background: var(--accent); border-color: var(--accent); }
.check-label, .radio-label { font-size: 14px; color: var(--text); flex: 1; }
.check-label small, .radio-label small { display: block; font-size: 11px; color: var(--text-muted); }

/* ── REPEATABLE ── */
.repeat-entry {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  position: relative;
}
.repeat-entry .entry-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.repeat-entry .entry-title {
  font-family: var(--font-head); font-size: 14px; font-weight: 600;
  color: var(--accent); letter-spacing: 0.5px;
}
.btn-remove-entry {
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2);
  color: var(--danger); border-radius: 6px; padding: 4px 10px;
  font-size: 12px; cursor: pointer; transition: all 0.2s;
}
.btn-remove-entry:hover { background: rgba(239,68,68,0.2); }
.btn-add-entry {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,229,255,0.06); border: 1px dashed rgba(0,229,255,0.2);
  color: var(--accent); border-radius: var(--radius);
  padding: 10px 18px; font-size: 13px; font-family: var(--font-head);
  cursor: pointer; width: 100%; justify-content: center;
  transition: all 0.2s; letter-spacing: 0.5px;
}
.btn-add-entry:hover { background: rgba(0,229,255,0.12); border-color: rgba(0,229,255,0.4); }

/* ── INFO BOX ── */
.info-box {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--accent3);
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 20px;
}

/* ── SUBMIT BAR ── */
.submit-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
}
.submit-note { font-size: 12px; color: var(--text-muted); max-width: 400px; }
.submit-note strong { color: var(--text); }

.btn-submit {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 14px 36px;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-submit::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-submit:hover::after { opacity: 1; }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

@media(max-width:640px) {
  .submit-bar { flex-direction: column; align-items: stretch; }
  .btn-submit { width: 100%; text-align: center; }
}

/* ── TOAST / ALERTS ── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9999;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  animation: slideIn 0.3s ease;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast .toast-icon { font-size: 18px; }
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── PROGRESS BAR ── */
.form-progress {
  display: flex; gap: 6px; margin-bottom: 32px;
}
.progress-step {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.progress-step.active { background: var(--accent); }
.progress-step.done { background: var(--accent2); }

/* ── LOADING OVERLAY ── */
#loading-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(8,9,13,0.85);
  backdrop-filter: blur(6px);
  z-index: 9998;
  flex-direction: column; align-items: center; justify-content: center; gap: 16px;
}
#loading-overlay.active { display: flex; }
.spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loading-overlay p { font-family: var(--font-head); color: var(--text-muted); letter-spacing: 1px; font-size: 14px; }

/* ── NAV ── */
.forms-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px;
}
.forms-nav a {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font-head);
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}
.forms-nav a:hover, .forms-nav a.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,229,255,0.06);
}
.forms-nav a.active { pointer-events: none; }
