/* auth.css - Premium Modern Design */

:root {
  --auth-bg: #F8FAFC;
  --auth-card: #FFFFFF;
  --auth-text: #0F172A;
  --auth-sub: #64748B;
  --auth-border: #E2E8F0;
  --auth-primary: #111827; /* Near Black */
  --auth-primary-hover: #000000;
  --focus-ring: rgba(59, 130, 246, 0.4);
}

.authPage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--auth-bg);
  /* Subtle mesh gradient background */
  background-image: 
    radial-gradient(at 0% 0%, hsla(253,16%,7%,0) 0, transparent 50%), 
    radial-gradient(at 50% 0%, hsla(225,39%,30%,0.03) 0, transparent 50%), 
    radial-gradient(at 100% 0%, hsla(339,49%,30%,0.03) 0, transparent 50%);
  font-family: 'Inter', sans-serif;
}

/* Header */
.authTop {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.authTop__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.authTop__logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.authTop__name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--auth-text);
}

.authTop__back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--auth-sub);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.authTop__back:hover { color: var(--auth-primary); }

/* Main Shell */
.authShell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin-bottom: 60px; /* Balance visually */
}

/* Card Design */
.authCard {
  width: 100%;
  max-width: 420px;
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.02), 
    0 10px 15px -3px rgba(0, 0, 0, 0.04),
    0 20px 40px -4px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease;
}

.authHead { text-align: center; margin-bottom: 24px; }

.authEyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--auth-sub);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.authTitle {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--auth-text);
  margin: 0 0 8px 0;
  letter-spacing: -0.03em;
  transition: opacity 0.15s ease;
}

.authSub {
  font-size: 14px;
  color: var(--auth-sub);
  line-height: 1.5;
  margin: 0;
}

/* Google Button */
.authBtn--google {
  background: white;
  border: 1px solid var(--auth-border);
  color: var(--auth-text);
  font-weight: 600;
  width: 100%;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.authBtn--google:hover {
  background: #fcfcfc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.authBtn--google:active { transform: translateY(0); }

/* Separator */
.authSep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}
.authSep__line { height: 1px; background: var(--auth-border); flex: 1; }
.authSep__txt { font-size: 12px; color: #94a3b8; font-weight: 500; }

/* Switcher (Login/Signup) */
.authSwitch {
  background: #F1F5F9;
  padding: 4px;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 24px;
}
.authSwitch__btn {
  background: transparent;
  border: none;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--auth-sub);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.authSwitch__btn.is-active {
  background: white;
  color: var(--auth-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Form Fields */
.authForm { display: flex; flex-direction: column; gap: 16px; }

.authField { display: block; }
.authField span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-text);
  margin-bottom: 8px;
}
.flexBetween { display: flex; justify-content: space-between; align-items: center; }

.inputWrapper { position: relative; }
.authInput {
  width: 100%;
  height: 48px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 15px;
  color: var(--auth-text);
  background: white;
  transition: all 0.2s;
}
.authInput:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.authLinkBtn {
  background: none;
  border: none;
  font-size: 12px;
  color: #3b82f6;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}
.authLinkBtn:hover { text-decoration: underline; }

/* Primary Button with Loader Support */
.authBtn--solid {
  background: var(--auth-primary);
  color: white;
  border: none;
  height: 48px;
  width: 100%;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}
.authBtn--solid:hover {
  background: var(--auth-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 10px rgba(0,0,0,0.15);
}
.authBtn--solid:active { transform: translateY(0); }

/* Loading State */
.authBtn.is-loading {
  opacity: 0.8;
  pointer-events: none;
}
.btnLoader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.is-loading .btnLoader { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Messages */
.authMsg {
  font-size: 13px;
  border-radius: 8px;
  text-align: center;
  min-height: 20px;
  font-weight: 500;
  transition: all 0.2s;
}

/* Footer */
.authFoot {
  margin-top: 32px;
  text-align: center;
  font-size: 13px;
  color: var(--auth-sub);
  line-height: 1.6;
}
.authFoot a {
  color: var(--auth-text);
  text-decoration: none;
  font-weight: 600;
}
.authFoot a:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 480px) {
  .authTop { padding: 16px; }
  .authCard { padding: 24px; border: none; box-shadow: none; background: transparent; }
  .authShell { padding: 0; align-items: flex-start; }
}