@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;400;500;600&display=swap');

:root {
  --bg: #f5f4f0;
  --ink: #0e0e0e;
  --ink-soft: #3a3a3a;
  --muted: #7a7a7a;
  --border: #e0ddd7;
  --surface: #ffffff;
  --surface-soft: #faf9f7;
  --gold: #b89b5e;
  --gold-light: #d4b97a;
  --gold-soft: rgba(184, 155, 94, 0.12);
  --dark: #0e0e0e;
  --dark-panel: #111110;
  --dark-mid: #1c1c1a;
  --dark-border: rgba(255,255,255,0.08);
  --primary: #0e0e0e;
  --radius-xl: 28px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow: 0 32px 80px rgba(14,14,14,0.12);
  --shadow-gold: 0 8px 32px rgba(184,155,94,0.22);
}

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

body {
  font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─── AUTH LAYOUT ─── */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, rgba(184,155,94,0.06), transparent),
    radial-gradient(ellipse 50% 60% at 80% 90%, rgba(14,14,14,0.04), transparent),
    var(--bg);
}

.auth-shell {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 680px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ─── BRAND PANEL (LEFT - DARK) ─── */
.brand-panel {
  background: var(--dark-panel);
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

/* Decorative grain texture */
.brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

/* Gold orb accent */
.brand-panel::after {
  content: '';
  position: absolute;
  right: -100px;
  bottom: -120px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(184,155,94,0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.brand-panel > * { position: relative; z-index: 1; }

/* Logo area */
.brand-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-gold);
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-top strong {
  display: block;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 17px;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-top span {
  font-size: 12px;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
  display: block;
}

/* Hero copy */
.hero-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0 32px;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
  width: fit-content;
}

.brand-panel h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 18px;
  font-weight: 400;
}

.brand-panel h1 em {
  color: var(--gold);
  font-style: italic;
}

.brand-panel p {
  color: rgba(255,255,255,0.52);
  line-height: 1.75;
  font-size: 15px;
  font-weight: 300;
  max-width: 420px;
}

/* Feature pills */
.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 32px;
}

.feature-pill {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--dark-border);
  color: rgba(255,255,255,0.7);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
}

.feature-pill:hover {
  background: rgba(184,155,94,0.1);
  border-color: rgba(184,155,94,0.3);
  color: var(--gold-light);
}

/* Mini card */
.mini-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--dark-border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  display: grid;
  gap: 6px;
}

.mini-card strong {
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 600;
}

.mini-card span {
  color: rgba(255,255,255,0.42);
  font-size: 12.5px;
  line-height: 1.65;
  font-weight: 300;
}

/* ─── AUTH CARD (RIGHT - LIGHT) ─── */
.auth-card {
  background: var(--surface);
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-heading {
  margin-bottom: 32px;
}

.auth-heading h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 36px;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 8px;
  line-height: 1.1;
}

.auth-heading p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  font-weight: 300;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 28px;
}

.tabs button {
  flex: 1;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 16px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.01em;
}

.tabs button.active {
  background: var(--dark);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(14,14,14,0.18);
}

.tabs button:not(.active):hover {
  color: var(--ink);
}

/* Inputs */
input {
  width: 100%;
  padding: 13px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.2s ease;
  font-family: 'DM Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 400;
}

input::placeholder {
  color: #b0aca5;
}

input:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(184,155,94,0.1);
}

/* Buttons */
button {
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.primary {
  width: 100%;
  background: var(--dark);
  color: #ffffff;
  margin-top: 4px;
  box-shadow: 0 4px 20px rgba(14,14,14,0.2);
  position: relative;
  overflow: hidden;
}

.primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(184,155,94,0.08));
  pointer-events: none;
}

.primary:hover {
  background: #1c1c1a;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(14,14,14,0.28);
}

.primary:active {
  transform: translateY(0);
}

/* Misc */
.hidden { display: none !important; }

.hint {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 14px;
  line-height: 1.6;
  font-weight: 300;
}

.hint b { color: var(--ink-soft); font-weight: 600; }

#message {
  min-height: 22px;
  color: var(--gold);
  font-weight: 600;
  font-size: 13.5px;
  margin-top: 4px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
    border-radius: var(--radius-md);
  }

  .brand-panel {
    padding: 36px 28px;
    min-height: auto;
  }

  .auth-card {
    padding: 36px 28px;
  }

  .feature-list {
    grid-template-columns: 1fr 1fr;
  }

  .brand-panel h1 {
    font-size: 36px;
  }
}

@media (max-width: 480px) {
  .auth-body { padding: 16px; }
  .feature-list { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 22px; }
  .brand-panel { padding: 28px 22px; }
}
