/* ============================================================
   LOGIN.CSS — Sign In / Sign Up page (Award-level redesign)
   Split layout: dark brand panel + clean form panel
   ============================================================ */

/* ── Split layout ── */
body.login-body {
  min-height: 100vh; min-height: 100dvh;
  margin: 0;
  padding: 0;
  background: white;
}
body.login-body main {
  display: flex;
  flex-direction: row;
  min-height: 100vh; min-height: 100dvh;
}

/* ── LEFT PANEL: Brand + trust ── */
.login-brand-panel {
  width: 44%;
  min-height: 100vh; min-height: 100dvh;
  background: var(--ink);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 6vw, 80px);
}

.login-brand-panel::before {
  content: '';
  position: absolute;
  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)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
}

.login-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(196,98,45,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.login-brand-logo {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  color: white;
  text-decoration: none;
  position: absolute;
  top: 40px;
  left: clamp(32px, 4vw, 56px);
  z-index: 2;
  opacity: 1;
  animation: fadeUp 0.5s ease 0.1s both;
}

.login-brand-content {
  position: relative;
  z-index: 2;
  max-width: 400px;
}

.login-brand-tagline {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: white;
  margin-bottom: 20px;
  opacity: 1;
  animation: fadeUp 0.6s ease 0.2s both;
}

.login-brand-tagline em {
  font-style: italic;
  color: var(--clay-light);
}

.login-brand-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.4);
  line-height: 1.7;
  margin-bottom: 48px;
  opacity: 1;
  animation: fadeUp 0.5s ease 0.35s both;
}

.login-trust-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 1;
  animation: fadeUp 0.5s ease 0.5s both;
}

.login-trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}

.login-trust-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* ── RIGHT PANEL: Auth form ── */
.login-form-panel {
  flex: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px clamp(32px, 6vw, 80px);
  position: relative;
  background: white;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.login-form-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--sand) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.3;
  pointer-events: none;
}

/* Old top logo hidden */
.logo { display: none; }

/* Floating dots hidden */
.login-dots { display: none; }

/* ── Auth card ── */
.auth-card {
  background: white;
  border: 1px solid var(--sand);
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 40px rgba(26,22,18,0.06), 0 1px 3px rgba(26,22,18,0.04);
}

.auth-card h1 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 6px;
}

.auth-card h1 em { font-style: italic; color: var(--clay); }

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--clay);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  color: var(--warm-grey);
  line-height: 1.65;
  margin-bottom: 36px;
}

/* ── Inputs ── */
.input-label { font-size: 12px; font-weight: 500; color: var(--ink); margin-bottom: 8px; display: block; }

.email-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-family: var(--sans);
  border: 1.5px solid var(--sand);
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink);
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-bottom: 14px;
}

.email-input:hover:not(:focus) { border-color: var(--clay-light); }
.email-input:focus {
  border-color: var(--clay);
  background: white;
  box-shadow: 0 0 0 4px rgba(196,98,45,0.1), 0 2px 8px rgba(196,98,45,0.06);
}
.email-input::placeholder { color: var(--warm-grey); transition: color 0.2s; }
.email-input:focus::placeholder { color: transparent; }

/* ── Buttons ── */
.submit-btn {
  width: 100%;
  padding: 15px;
  background: var(--clay);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.2s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.submit-btn:hover:not(:disabled) { background: var(--clay-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(196,98,45,0.3); }
.submit-btn:active:not(:disabled) { transform: scale(0.98) translateY(0); transition-duration: 0.1s; }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px;
  border: 1.5px solid var(--sand);
  border-radius: 12px;
  background: white;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--sans);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  margin-bottom: 8px;
  color: var(--ink);
}
.google-btn:hover { border-color: #4285F4; background: #fafbff; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(66,133,244,0.15); }

/* ── Tabs ── */
.auth-tabs { display: flex; gap: 4px; background: var(--cream); border-radius: 10px; padding: 3px; margin-bottom: 24px; }
.auth-tab { flex: 1; padding: 9px; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--sans); background: transparent; color: var(--warm-grey); transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.auth-tab.active { background: white; color: var(--clay); box-shadow: 0 1px 4px rgba(26,22,18,0.08); }

.password-subtabs { display: flex; gap: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--sand); padding-bottom: 12px; }
.password-subtab { background: none; border: none; font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--sans); color: var(--warm-grey); border-bottom: 2px solid transparent; padding-bottom: 4px; transition: color 0.2s, border-color 0.2s; }
.password-subtab.active { color: var(--clay); border-bottom-color: var(--clay); }

.login-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--warm-grey); font-size: 12px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--sand); }

/* ── Notes ── */
.ubco-note { display: flex; align-items: flex-start; gap: 10px; background: rgba(196,98,45,0.05); border: 1px solid rgba(196,98,45,0.12); border-radius: 10px; padding: 12px 14px; margin-top: 20px; }
.ubco-note-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.ubco-note-text { font-size: 12px; color: var(--warm-grey); line-height: 1.55; }
.ubco-note-text strong { color: var(--clay); font-weight: 500; }

.error-msg { background: #FEF2F2; color: #991B1B; font-size: 13px; line-height: 1.5; padding: 12px 16px; border-radius: 10px; border: 1px solid #FECACA; margin-bottom: 14px; display: none; animation: fadeUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

.success-state { display: none; text-align: center; animation: loginCardEntrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.success-icon { width: 64px; height: 64px; background: rgba(196,98,45,0.08); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 24px; }
.success-state h2 { font-family: var(--serif); font-size: 26px; font-weight: 700; margin-bottom: 10px; }
.success-state p { font-size: 14px; color: var(--warm-grey); line-height: 1.65; margin-bottom: 24px; }
.success-state strong { color: var(--ink); }
.resend-link { font-size: 13px; color: var(--clay); background: none; border: none; cursor: pointer; text-decoration: underline; font-family: var(--sans); }

.back-link { text-align: center; margin-top: 20px; font-size: 13px; color: var(--warm-grey); position: relative; z-index: 1; }
.back-link a { color: var(--clay); text-decoration: none; }
.back-link a:hover { text-decoration: underline; }

.login-legal { text-align: center; padding: 24px; font-size: 12px; color: var(--warm-grey); position: relative; z-index: 1; }
.login-legal a { color: var(--clay); }

/* ── Animations ── */
@keyframes loginCardEntrance {
  from { opacity: 1; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeUp {
  from { opacity: 1; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.auth-card { animation: loginCardEntrance 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.auth-card .eyebrow        { opacity: 1; animation: fadeUp 0.45s ease 0.12s both; }
.auth-card h1              { opacity: 1; animation: fadeUp 0.45s ease 0.2s both; }
.auth-card .google-btn     { opacity: 1; animation: fadeUp 0.4s ease 0.3s both; }
.auth-card .login-divider  { opacity: 1; animation: fadeUp 0.35s ease 0.36s both; }
.auth-card .auth-tabs      { opacity: 1; animation: fadeUp 0.35s ease 0.42s both; }
.auth-card #panel-password,
.auth-card #panel-magic    { opacity: 1; animation: fadeUp 0.45s ease 0.48s both; }
.auth-card .ubco-note      { opacity: 1; animation: fadeUp 0.35s ease 0.56s both; }

#panel-password, #panel-magic { transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
#panel-password.panel-exit, #panel-magic.panel-exit { opacity: 1; transform: translateY(6px); }
#panel-password.panel-enter, #panel-magic.panel-enter { opacity: 1; transform: translateY(-6px); }
#panel-password.panel-active, #panel-magic.panel-active { opacity: 1; transform: translateY(0); }

.auth-card.shake { animation: shake 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  body.login-body main { flex-direction: column; }
  .login-brand-panel { width: 100%; min-height: auto; padding: 48px 32px 40px; }
  .login-brand-logo { position: relative; top: 0; left: 0; margin-bottom: 32px; }
  .login-brand-tagline { font-size: 28px; }
  .login-brand-sub { margin-bottom: 28px; }
  .login-trust-row { flex-direction: row; flex-wrap: wrap; gap: 10px; }
  .login-trust-item { font-size: 12px; }
  .login-trust-icon { width: 32px; height: 32px; font-size: 14px; }
  .login-form-panel { min-height: auto; padding: 40px 24px 48px; }
}

@media (max-width: 600px) {
  .login-brand-panel { padding: 32px 20px 28px; }
  .login-brand-tagline { font-size: 24px; }
  .login-brand-sub { font-size: 14px; margin-bottom: 20px; }
  .login-trust-row { flex-direction: column; gap: 8px; }
  .login-form-panel { padding: 32px 20px 40px; }
  .auth-card { padding: 24px 18px; border-radius: 16px; box-shadow: none; border: none; }
  .auth-card h1 { font-size: 24px; }
}
