@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg: #0D0D0D;
  --bg-card: #161616;
  --bg-elevated: #1E1E1E;
  --border: #2A2A2A;
  --border-light: #333;
  --text-primary: #F5F0E8;
  --text-secondary: #9A9488;
  --text-muted: #5A5650;
  --accent: #D4A843;
  --accent-hover: #E8BC55;
  --accent-dim: rgba(212, 168, 67, 0.12);
  --accent-dim-hover: rgba(212, 168, 67, 0.2);
  --success: #4CAF7D;
  --error: #E05252;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── PAGE TRANSITIONS ─── */
body {
  opacity: 0;
  animation: fadeIn 0.35s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.page-exit {
  opacity: 1;
  animation: fadeOut 0.2s ease forwards;
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-8px); }
}

/* ─── STAGGERED ENTRY ─── */
.stagger-1 { animation: slideUp 0.5s ease 0.05s both; }
.stagger-2 { animation: slideUp 0.5s ease 0.15s both; }
.stagger-3 { animation: slideUp 0.5s ease 0.25s both; }
.stagger-4 { animation: slideUp 0.5s ease 0.35s both; }
.stagger-5 { animation: slideUp 0.5s ease 0.45s both; }

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

/* ─── NAVBAR ─── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.navbar-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.navbar-logo span {
  color: var(--accent);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #0D0D0D;
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212,168,67,0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  color: var(--text-primary);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #0D0D0D;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ─── FORM ELEMENTS ─── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 11px 14px;
  transition: var(--transition);
  outline: none;
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-light);
}

.card-selected {
  border-color: var(--accent) !important;
  background: var(--accent-dim) !important;
  box-shadow: 0 0 0 1px var(--accent);
}

/* ─── BADGE ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-accent {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(212,168,67,0.25);
}

.badge-success {
  background: rgba(76,175,125,0.12);
  color: var(--success);
  border: 1px solid rgba(76,175,125,0.25);
}

/* ─── DIVIDER ─── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── ALERTS ─── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-error {
  background: rgba(224,82,82,0.1);
  border: 1px solid rgba(224,82,82,0.25);
  color: #E05252;
}

.alert-success {
  background: rgba(76,175,125,0.1);
  border: 1px solid rgba(76,175,125,0.25);
  color: var(--success);
}

/* ─── LOADING OVERLAY ─── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,13,13,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

.loading-text {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.loading-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── PROGRESS STEPS ─── */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 40px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.step.active {
  color: var(--text-primary);
}

.step.done {
  color: var(--accent);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.step.active .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #0D0D0D;
}

.step.done .step-num {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.step-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  min-width: 32px;
  max-width: 64px;
}

/* ─── DRAG AND DROP ─── */
.drop-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-elevated);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.drop-zone-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.drop-zone-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.drop-zone-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── CONTAINER ─── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}

.container-sm {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-md {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── PAGE HEADER ─── */
.page-header {
  padding: 48px 0 32px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ─── GRAIN OVERLAY ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── UTILS ─── */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-display { font-family: var(--font-display); }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.hidden { display: none !important; }