*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --gold: #C9A84C; --gold-l: #E8C97A; --gold-d: #9A7A35;
  --bg: #0D0D0D; --bg2: #141414; --bg3: #1A1A1A; --bg4: #222;
  --text: #F0F0F0; --text2: #A0A0A0; --text3: #606060;
  --border: #2E2E2E; --border2: #3A3A3A;
  --danger: #E53E3E; --danger-bg: #2D1010;
  --r: 12px; --r-lg: 18px; --font: 'Inter', sans-serif;
  --tr: 0.25s cubic-bezier(0.4,0,0.2,1);
}
html, body { height: 100%; font-family: var(--font); background: var(--bg); color: var(--text); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); color: inherit; }
.hidden { display: none !important; }

/* ===== LAYOUT ===== */
.auth-wrap {
  display: flex;
  min-height: 100vh;
}

/* ===== LEFT PANEL ===== */
.auth-left {
  flex: 1;
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}
.al-bg {
  position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=1200&q=85');
  background-size: cover; background-position: center;
}
.al-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(13,13,13,0.92) 0%, rgba(13,13,13,0.7) 100%);
}
.al-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  padding: 40px 56px;
  width: 100%;
}
.auth-logo {
  font-size: 1.3rem; font-weight: 800;
  color: var(--gold); letter-spacing: 1px;
  margin-bottom: auto;
}
.al-hero {
  padding-bottom: 60px;
}
.al-hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 20px; color: #fff;
}
.al-hero h1 em {
  font-family: 'Playfair Display', serif; font-style: italic;
  background: linear-gradient(135deg, var(--gold-l), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; display: block;
}
.al-hero p { color: rgba(240,240,240,0.75); font-size: 1.05rem; margin-bottom: 36px; }
.al-perks { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.al-perks li {
  display: flex; align-items: center; gap: 14px;
  color: rgba(240,240,240,0.8); font-size: 0.95rem; font-weight: 500;
}
.al-perks li span { font-size: 1.2rem; flex-shrink: 0; }

/* ===== RIGHT PANEL ===== */
.auth-right {
  width: 560px;
  flex-shrink: 0;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 40px 48px;
  border-left: 1px solid var(--border);
  overflow-y: auto;
}
.back-link {
  align-self: flex-start;
  color: var(--text2); font-size: 0.85rem;
  transition: color 0.2s; margin-bottom: 32px;
}
.back-link:hover { color: var(--gold); }

.auth-box { width: 100%; }

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--bg3);
  border-radius: 50px;
  border: 1px solid var(--border);
  padding: 4px; gap: 4px;
  margin-bottom: 36px;
}
.auth-tab {
  flex: 1; padding: 10px;
  border-radius: 50px;
  font-size: 0.9rem; font-weight: 600;
  color: var(--text2); transition: var(--tr);
}
.auth-tab.active { background: var(--gold); color: #0D0D0D; }

/* Forms */
.auth-form { display: none; }
.auth-form.active { display: block; }
.form-header { margin-bottom: 28px; }
.form-header h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.form-header p { color: var(--text2); font-size: 0.88rem; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 0.78rem; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.6px; }
.field input {
  background: var(--bg4); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 0.92rem;
  padding: 12px 14px; outline: none; width: 100%;
  transition: border-color 0.2s;
}
.field input:focus { border-color: var(--gold); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-eye {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 1rem; opacity: 0.45; transition: opacity 0.2s;
}
.pw-eye:hover { opacity: 1; }

/* Avatar */
.avatar-row {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 24px; padding: 16px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r);
}
.avatar-circle {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--bg4); border: 2px dashed var(--border2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden; position: relative;
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
#avatarLetter { font-size: 1.8rem; }
.avatar-info p { font-size: 0.88rem; font-weight: 600; margin-bottom: 8px; }
.avatar-info .opt { color: var(--text2); font-weight: 400; }
.btn-upload {
  background: var(--bg4); border: 1px solid var(--border);
  color: var(--text2); font-size: 0.8rem; font-weight: 600;
  padding: 7px 16px; border-radius: 50px; transition: var(--tr);
}
.btn-upload:hover { background: var(--bg3); color: var(--text); border-color: var(--border2); }

.auth-msg {
  padding: 10px 14px; border-radius: 8px;
  font-size: 0.82rem; font-weight: 500; margin-bottom: 16px;
}
.auth-msg.error { background: var(--danger-bg); border: 1px solid rgba(229,62,62,0.4); color: var(--danger); }
.auth-msg.success { background: #1a2e1a; border: 1px solid rgba(72,187,120,0.4); color: #48BB78; }

.btn-auth {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-d));
  color: #0D0D0D; font-weight: 800; font-size: 0.95rem;
  border-radius: 50px; border: none; cursor: pointer;
  transition: var(--tr); margin-top: 4px;
}
.btn-auth:hover { background: linear-gradient(135deg, var(--gold-l), var(--gold)); transform: translateY(-2px); }

.switch-hint { text-align: center; color: var(--text2); font-size: 0.85rem; margin-top: 20px; }
.link-btn { color: var(--gold); font-size: 0.85rem; font-weight: 600; transition: color 0.2s; }
.link-btn:hover { color: var(--gold-l); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .auth-left { display: none; }
  .auth-right { width: 100%; border-left: none; padding: 32px 24px 48px; }
}
@media (max-width: 480px) {
  .auth-right { padding: 24px 16px 40px; }
  .field-row { grid-template-columns: 1fr; }
  .auth-tabs .auth-tab { font-size: 0.82rem; padding: 9px 12px; }
}
