@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:       #6d7fcc;
  --brand-hover: #5c6bb5;
  --admin:       #1e293b;
  --admin-hover: #0f172a;
  --white:       #ffffff;
  --gray-50:     #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-400:    #94a3b8;
  --gray-500:    #64748b;
  --gray-700:    #334155;
  --gray-900:    #0f172a;
  --error:       #ef4444;
  --success:     #22c55e;
}

body.auth-body {
  font-family: 'Inter', 'Poppins', sans-serif;
  background: var(--gray-50);
  min-height: 100vh;
  color: var(--gray-900);
}

/* ── Layout ─────────────────────────────────── */
.auth-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Left brand panel ───────────────────────── */
.auth-brand-panel {
  flex: 0 0 440px;
  background: linear-gradient(145deg, var(--brand) 0%, #4a5fa0 100%);
  color: #fff;
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

.auth-brand-panel--admin {
  background: linear-gradient(145deg, var(--admin) 0%, #0f172a 100%);
}

/* subtle geometric decoration */
.auth-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.08) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(255,255,255,.05) 0%, transparent 45%);
  pointer-events: none;
}

.auth-brand-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 44px;
  width: 100%;
}

.auth-logo {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.auth-logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.6);
  display: inline-block;
}

.auth-hero {
  margin: auto 0;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.auth-headline {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 18px;
}

.auth-tagline {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,.65);
  max-width: 300px;
}

.auth-footer {
  font-size: 12px;
  color: rgba(255,255,255,.4);
}

/* ── Right form panel ───────────────────────── */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--white);
}

.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}

/* ── Form header ────────────────────────────── */
.auth-form-header {
  margin-bottom: 36px;
}

.auth-admin-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fef9c3;
  color: #854d0e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.auth-admin-tag::before {
  content: '⚙';
  font-size: 11px;
}

.auth-form-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
  line-height: 1.2;
}

.auth-form-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ── Fields ─────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: .1px;
}

.auth-field input {
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--gray-50);
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
  width: 100%;
}

.auth-field input::placeholder { color: var(--gray-400); }

.auth-field input:focus {
  border-color: var(--brand);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(109,127,204,.18);
}

.auth-field input:focus.admin-focus {
  border-color: var(--admin);
  box-shadow: 0 0 0 3px rgba(30,41,59,.15);
}

/* admin variant input focus */
.auth-form--admin .auth-field input:focus {
  border-color: var(--admin);
  box-shadow: 0 0 0 3px rgba(30,41,59,.15);
}

/* ── Submit button ───────────────────────────── */
.auth-submit {
  height: 48px;
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s, opacity .15s;
  margin-top: 6px;
  letter-spacing: .1px;
}

.auth-submit:hover:not(:disabled) { background: var(--brand-hover); }
.auth-submit:active:not(:disabled) { transform: scale(.985); }
.auth-submit:disabled { opacity: .6; cursor: default; }

.auth-submit--admin {
  background: var(--admin);
}
.auth-submit--admin:hover:not(:disabled) { background: var(--admin-hover); }

/* ── Google sign-in button ──────────────────── */
.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 48px;
  width: 100%;
  background: var(--white);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
}

.auth-google-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.auth-google-btn:active { transform: scale(.985); }

.auth-google-btn svg { flex: 0 0 auto; }

/* ── Message ────────────────────────────────── */
.auth-message {
  font-size: 13px;
  min-height: 18px;
  text-align: center;
  border-radius: 8px;
  padding: 0;
  transition: all .2s;
}

.auth-message:not(:empty) {
  padding: 10px 14px;
}

.auth-message--error {
  color: var(--error);
  background: #fef2f2;
}

.auth-message--success {
  color: var(--success);
  background: #f0fdf4;
}

/* ── Divider ────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.auth-divider span {
  font-size: 12px;
  color: var(--gray-400);
  white-space: nowrap;
}

/* ── Links section ───────────────────────────── */
.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.auth-link {
  font-size: 14px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}

.auth-link:hover { color: var(--brand-hover); text-decoration: underline; }

.auth-link--muted {
  color: var(--gray-400);
  font-size: 13px;
  font-weight: 400;
}

.auth-link--muted:hover { color: var(--gray-500); text-decoration: none; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
  .auth-brand-panel {
    flex: 0 0 340px;
  }
  .auth-headline { font-size: 30px; }
}

@media (max-width: 680px) {
  .auth-brand-panel { display: none; }
  .auth-form-panel { padding: 40px 20px; background: var(--gray-50); }
  .auth-form-wrap {
    background: var(--white);
    padding: 36px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
  }
}
