/* ─────────────────────────────────────────────
   auth.css — Login / auth pages (Apple glass)
───────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

.auth-body {
  min-height: 100vh;
  background: #000000;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(10,132,255,0.10) 0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 85% 90%,  rgba(94,92,230,0.07)  0%, transparent 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
  margin-left: 0 !important;
}

/* ── Card ──────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 450px;
  background: rgba(28, 28, 30, 0.88);
  backdrop-filter: blur(28px) saturate(1.8);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  border: 1px solid rgba(84, 84, 88, 0.50);
  border-radius: 1.1rem;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
}

/* ── Logo section ──────────────────────────── */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.5rem 1.75rem 1.35rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(84,84,88,0.40);
}

.auth-logo-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 100%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff;
}

.auth-brand-name {
  display: block;
  font-size: 1rem; font-weight: 700;
  letter-spacing: -0.015em;
  color: rgba(255,255,255,0.92);
}

.auth-brand-sub {
  display: block;
  font-size: 0.71rem;
  color: rgba(255,255,255,0.35);
  margin-top: 1px;
}

/* ── Department switcher tabs ──────────────── */
.auth-dept-tabs {
  display: flex; gap: 0.3rem;
  padding: 1.15rem 1.75rem 1.15rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(84,84,88,0.40);
}
.auth-dept-tab {
  flex: 1; text-align: center;
  padding: 0.5rem 0.4rem;
  border-radius: 0.5rem;
  font-size: 0.78rem; font-weight: 600;
  color: rgba(255,255,255,0.42);
  background: rgba(255,255,255,0.04);
  border: 1px solid transparent;
  text-decoration: none;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.auth-dept-tab:hover { color: rgba(255,255,255,0.72); }
.auth-dept-tab.active {
  background: rgba(10,132,255,0.14);
  border-color: rgba(10,132,255,0.4);
  color: #7dc4ff;
}

/* ── Smart team-mismatch redirect card ─────── */
.smart-error {
  display: flex; gap: 0.75rem;
  background: rgba(255,159,10,0.10);
  border: 1px solid rgba(255,159,10,0.3);
  border-radius: 0.7rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1.3rem;
}
.smart-error-icon { flex-shrink: 0; color: #FF9F0A; margin-top: 0.1rem; }
.smart-error-title { font-size: 0.86rem; font-weight: 700; color: #FED7AA; margin-bottom: 0.25rem; }
.smart-error-sub { font-size: 0.78rem; color: rgba(255,255,255,0.55); line-height: 1.5; margin-bottom: 0.7rem; }
.smart-error-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #FF9F0A; color: #1a1200;
  font-size: 0.8rem; font-weight: 700;
  padding: 0.45rem 0.9rem; border-radius: 0.5rem;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', system-ui, sans-serif;
}
.smart-error-btn svg { width: 12px; height: 12px; }
.smart-error-btn:hover { opacity: 0.88; }

/* ── Card body ─────────────────────────────── */
.auth-card-body { padding: 1.75rem 1.75rem 1.5rem; }

.auth-title {
  font-size: 1.15rem; font-weight: 700;
  letter-spacing: -0.018em;
  color: rgba(255,255,255,0.92);
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.42);
  margin-bottom: 1.4rem;
}

/* ── Alerts ────────────────────────────────── */
.auth-error {
  display: flex; align-items: center; gap: 0.55rem;
  background: rgba(255,69,58,0.12);
  border: 1px solid rgba(255,69,58,0.28);
  border-radius: 0.55rem;
  padding: 0.65rem 0.85rem;
  color: #FF453A; font-size: 0.83rem;
  margin-bottom: 1.1rem;
}
.auth-error svg { flex-shrink: 0; }

.auth-success {
  display: flex; align-items: center; gap: 0.55rem;
  background: rgba(48,209,88,0.10);
  border: 1px solid rgba(48,209,88,0.28);
  border-radius: 0.55rem;
  padding: 0.65rem 0.9rem;
  color: #30D158; font-size: 0.83rem;
  margin-bottom: 1.1rem;
}
.auth-success svg { flex-shrink: 0; }

/* ── Form ──────────────────────────────────── */
.auth-form  { display: flex; flex-direction: column; gap: 1rem; }
.auth-field { display: flex; flex-direction: column; gap: 0.35rem; }

.auth-label {
  font-size: 0.78rem; font-weight: 600;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.01em;
}

.auth-input-wrap { position: relative; }
.auth-input-wrap .auth-input { padding-right: 2.5rem; }

.auth-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(84,84,88,0.50);
  border-radius: 0.6rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.92);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', system-ui, sans-serif;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.auth-input::placeholder { color: rgba(255,255,255,0.22); }
.auth-input:focus {
  border-color: #0A84FF;
  box-shadow: 0 0 0 3px rgba(10,132,255,0.18);
}

/* ── Password toggle ───────────────────────── */
.auth-pw-toggle {
  position: absolute; right: 0.65rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.28); padding: 0.25rem;
  display: flex; align-items: center;
  transition: color 0.15s;
}
.auth-pw-toggle:hover { color: rgba(255,255,255,0.65); }

/* ── Submit ────────────────────────────────── */
.auth-submit {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.75rem 1rem; margin-top: 0.5rem;
  background: #0A84FF;
  color: #fff; border: none; border-radius: 0.6rem;
  font-size: 0.9rem; font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', system-ui, sans-serif;
  cursor: pointer;
  transition: transform 80ms cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.15s;
  letter-spacing: 0.01em; will-change: transform;
}
.auth-submit:hover  { opacity: 0.88; }
.auth-submit:active { transform: scale(0.97); }

/* ── Card footer ───────────────────────────── */
.auth-card-footer {
  padding: 0.9rem 1.75rem;
  border-top: 1px solid rgba(84,84,88,0.35);
  text-align: center;
}
.auth-card-footer p { font-size: 0.72rem; color: rgba(255,255,255,0.22); }
