:root {
  --void: #040E0A;
  --forest: #071E16;
  --euca-dark: #0F3D2A;
  --living: #1A6B4A;
  --accent: #22C55E;
  --mist: #A8E6CF;
  --gold: #D4A843;
  --cream: #FAF8F0;
  --cream-dim: rgba(250, 248, 240, 0.7);
  --cream-ghost: rgba(250, 248, 240, 0.4);
  --danger: #EF4444;
  --danger-soft: rgba(239, 68, 68, 0.15);

  --f-display: 'Sora', system-ui, sans-serif;
  --f-body: 'Noto Sans Georgian', 'Sora', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  background: var(--forest);
  color: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color 0.3s var(--ease); }
a:hover { color: var(--mist); }
::selection { background: var(--gold); color: var(--void); }

/* ═══ AUTH LAYOUT ═══ */
.auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-page::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ═══ AUTH CARD ═══ */
.auth-card {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
  animation: cardIn 0.8s var(--ease-out) forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}

.auth-card-inner {
  background: rgba(15, 61, 42, 0.5);
  border: 1px solid rgba(34, 197, 94, 0.12);
  border-radius: 20px;
  padding: 48px 40px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(250, 248, 240, 0.03);
}

/* ═══ LOGO ═══ */
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}

.auth-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  mix-blend-mode: screen;
}

.auth-logo-text {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.15em;
  color: var(--cream);
}

/* ═══ HEADING ═══ */
.auth-title {
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 8px;
  text-align: center;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--cream-ghost);
  text-align: center;
  margin-bottom: 36px;
  line-height: 1.5;
}

/* ═══ FORM ═══ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  position: relative;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--cream-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.form-group input {
  width: 100%;
  height: 52px;
  background: rgba(4, 14, 10, 0.5);
  border: 1px solid rgba(250, 248, 240, 0.1);
  border-radius: 12px;
  padding: 0 16px;
  font-family: var(--f-body);
  font-size: 15px;
  color: var(--cream);
  transition: all 0.3s var(--ease);
  outline: none;
}

.form-group input::placeholder {
  color: rgba(250, 248, 240, 0.25);
}

.form-group input:focus {
  border-color: var(--accent);
  background: rgba(4, 14, 10, 0.7);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.form-group input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ═══ PASSWORD TOGGLE ═══ */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--cream-ghost);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  background: none;
  border: none;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}

.password-toggle:hover {
  color: var(--cream);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

/* ═══ PASSWORD STRENGTH ═══ */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  height: 3px;
}

.strength-bar {
  flex: 1;
  height: 100%;
  border-radius: 2px;
  background: rgba(250, 248, 240, 0.08);
  transition: background 0.3s var(--ease);
}

.strength-bar.active.weak { background: var(--danger); }
.strength-bar.active.medium { background: var(--gold); }
.strength-bar.active.strong { background: var(--accent); }

.strength-text {
  font-size: 11px;
  margin-top: 6px;
  color: var(--cream-ghost);
  font-family: var(--f-mono);
}

/* ═══ BUTTON ═══ */
.auth-btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 12px;
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease);
  margin-top: 8px;
}

.auth-btn-primary {
  background: var(--accent);
  color: var(--forest);
}

.auth-btn-primary:hover {
  background: #2AD965;
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.25);
}

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

.auth-btn-gold {
  background: var(--gold);
  color: var(--forest);
}

.auth-btn-gold:hover {
  background: #DEBC5C;
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(212, 168, 67, 0.25);
}

.auth-btn-outline {
  background: transparent;
  border: 1px solid rgba(250, 248, 240, 0.15);
  color: var(--cream);
}

.auth-btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(34, 197, 94, 0.05);
}

.auth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Loading state */
.auth-btn.loading {
  pointer-events: none;
  color: transparent;
}

.auth-btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(7, 30, 22, 0.3);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ═══ DIVIDER ═══ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(250, 248, 240, 0.08);
}

.auth-divider span {
  font-size: 11px;
  font-family: var(--f-mono);
  color: var(--cream-ghost);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ═══ LINKS ═══ */
.auth-links {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--cream-ghost);
}

.auth-links a {
  color: var(--gold);
  font-weight: 500;
}

.auth-links a:hover {
  color: #DEBC5C;
}

.form-link {
  display: inline-block;
  font-size: 13px;
  color: var(--gold);
  margin-top: -4px;
  text-align: right;
  width: 100%;
}

/* ═══ CHECKBOX ═══ */
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--cream-dim);
}

.form-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(250, 248, 240, 0.15);
  border-radius: 6px;
  background: rgba(4, 14, 10, 0.5);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
}

.form-check input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.form-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 6px;
  height: 10px;
  border: solid var(--forest);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ═══ ALERTS ═══ */
.auth-alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: alertIn 0.4s var(--ease-out);
}

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

.auth-alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-alert-error {
  background: var(--danger-soft);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #FCA5A5;
}

.auth-alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--mist);
}

.auth-alert-info {
  background: rgba(212, 168, 67, 0.12);
  border: 1px solid rgba(212, 168, 67, 0.25);
  color: #F5DFA3;
}

/* ═══ ACCOUNT PAGE ═══ */
.account-page {
  flex: 1;
  padding: 40px 20px 80px;
  max-width: 800px;
  margin: 80px auto 0;
  width: 100%;
}

.account-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(250, 248, 240, 0.08);
}

.account-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--living));
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--forest);
  flex-shrink: 0;
}

.account-info h1 {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.account-info p {
  font-size: 14px;
  color: var(--cream-ghost);
}

.account-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  background: rgba(4, 14, 10, 0.4);
  padding: 4px;
  border-radius: 12px;
  overflow-x: auto;
}

.account-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--cream-ghost);
  border-radius: 8px;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--f-body);
}

.account-tab:hover {
  color: var(--cream);
}

.account-tab.active {
  background: var(--euca-dark);
  color: var(--cream);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.account-section {
  background: rgba(15, 61, 42, 0.3);
  border: 1px solid rgba(250, 248, 240, 0.06);
  border-radius: 16px;
  padding: 32px;
}

.account-section h2 {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--cream);
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.account-form .form-group input {
  height: 48px;
}

.account-form .auth-btn {
  max-width: 200px;
  height: 46px;
  font-size: 14px;
}

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-family: var(--f-mono);
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent);
}

.badge-unverified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-family: var(--f-mono);
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--danger-soft);
  color: #FCA5A5;
}

/* ═══ NAV AUTH BUTTONS ═══ */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-auth-login {
  font-size: 14px;
  font-weight: 500;
  color: var(--cream-dim);
  transition: color 0.3s;
}

.nav-auth-login:hover {
  color: var(--cream);
}

.nav-auth-register {
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  background: var(--accent);
  color: var(--forest);
  transition: all 0.3s var(--ease);
}

.nav-auth-register:hover {
  background: #2AD965;
  transform: translateY(-1px);
}

.nav-user-menu {
  position: relative;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  background: rgba(15, 61, 42, 0.5);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.nav-user-btn:hover {
  background: rgba(15, 61, 42, 0.8);
  border-color: rgba(34, 197, 94, 0.3);
}

.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--forest);
}

.nav-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--cream);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 640px) {
  .auth-card-inner {
    padding: 36px 24px;
    border-radius: 16px;
  }

  .auth-title {
    font-size: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .account-page {
    margin-top: 60px;
    padding: 20px 16px 60px;
  }

  .account-header {
    flex-direction: column;
    text-align: center;
  }

  .account-section {
    padding: 24px 20px;
  }

  .account-tabs {
    gap: 2px;
  }

  .account-tab {
    padding: 8px 14px;
    font-size: 13px;
  }
}
