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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: #183a5c;
  background: #f8fafc;
  min-height: 100vh;
  line-height: 1.5;
}

:root {
  --navy-50:  #f0f5fa; --navy-100: #dbe7f3; --navy-200: #b8d0e8;
  --navy-300: #8fb2d8; --navy-400: #6691c5; --navy-500: #4574b0;
  --navy-600: #305b96; --navy-700: #264a7b; --navy-800: #1F4E79;
  --navy-900: #183a5c;
  --accent: #FFB400; --accent-dark: #E0A000;
  --success: #00B050; --danger: #C00000; --warning: #F59E0B;
  --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0;
  --slate-300: #cbd5e1; --slate-400: #94a3b8; --slate-500: #64748b;
  --slate-600: #475569; --slate-700: #334155; --slate-900: #0f172a;
  --radius-sm: 0.5rem; --radius: 0.75rem; --radius-lg: 1rem; --radius-xl: 1.5rem;
  --shadow-input: 0 0 0 3px rgba(31, 78, 121, 0.15);
  --shadow-card: 0 10px 40px -10px rgba(31, 78, 121, 0.15);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-container { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 1024px) { .auth-container { flex-direction: row; } }

.auth-branding {
  display: none;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-900) 100%);
  color: white; padding: 3rem;
}
@media (min-width: 1024px) {
  .auth-branding { display: flex; flex-direction: column; justify-content: space-between; width: 50%; padding: 4rem; }
}
@media (min-width: 1280px) { .auth-branding { width: 40%; padding: 4rem 5rem; } }

.auth-branding::before {
  content: ''; position: absolute; top: -3rem; left: -3rem;
  width: 24rem; height: 24rem;
  background: radial-gradient(circle, transparent 50%, rgba(255, 180, 0, 0.08) 50%, rgba(255, 180, 0, 0.08) 60%, transparent 60%);
  border-radius: 50%; pointer-events: none;
}
.auth-branding > * { position: relative; z-index: 1; }

.auth-branding-logo { display: flex; align-items: center; gap: 0.75rem; }
.auth-branding-logo-badge {
  width: 3.5rem; height: 3.5rem; background: var(--accent); border-radius: 1rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--navy-900); font-size: 1.5rem;
  box-shadow: 0 10px 30px rgba(255, 180, 0, 0.3);
}
.auth-branding-logo-text .title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.auth-branding-logo-text .subtitle { font-size: 0.7rem; color: var(--navy-200); text-transform: uppercase; letter-spacing: 0.15em; }

.auth-branding-heading { font-size: 2.5rem; font-weight: 800; line-height: 1.1; margin: 3rem 0 1.5rem; }
.auth-branding-heading .accent { color: var(--accent); }
.auth-branding-subheading { font-size: 1.125rem; color: var(--navy-100); max-width: 28rem; line-height: 1.6; }

.auth-branding-features { list-style: none; padding: 0; margin: 2rem 0 0; }
.auth-branding-features li { display: flex; align-items: center; gap: 0.75rem; color: var(--navy-100); padding: 0.5rem 0; }
.auth-branding-features svg { width: 1.25rem; height: 1.25rem; color: var(--accent); flex-shrink: 0; }

.auth-branding-footer { font-size: 0.875rem; color: var(--navy-300); }
.auth-branding-footer a { color: inherit; text-decoration: none; transition: color var(--transition); }
.auth-branding-footer a:hover { color: var(--accent); }

.auth-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 3rem 1.5rem; }
@media (min-width: 640px) { .auth-main { padding: 3rem; } }
@media (min-width: 1024px) { .auth-main { padding: 3rem 4rem; } }

.auth-main-inner { width: 100%; max-width: 28rem; margin: 0 auto; }

.auth-logo-mobile { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; }
@media (min-width: 1024px) { .auth-logo-mobile { display: none; } }
.auth-logo-mobile-badge {
  width: 3rem; height: 3rem; background: var(--navy-800); border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--accent); font-size: 1.25rem;
}

.auth-tenant-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1.5rem; padding: 0.375rem 0.875rem; border-radius: 9999px;
  background: var(--navy-50); border: 1px solid var(--navy-200);
  font-size: 0.75rem; font-weight: 600; color: var(--navy-800);
}
.auth-tenant-badge svg { width: 0.875rem; height: 0.875rem; }

.auth-title { font-size: 1.875rem; font-weight: 800; color: var(--navy-900); margin: 0 0 0.5rem; line-height: 1.2; }
.auth-subtitle { color: var(--slate-600); margin-bottom: 2rem; }
.auth-subtitle a {
  color: var(--navy-700); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 2px;
}
.auth-subtitle a:hover { color: var(--navy-900); }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 600; color: var(--navy-800); }
.form-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.form-label-row .form-label { margin-bottom: 0; }
.form-label-link { font-size: 0.75rem; font-weight: 600; color: var(--navy-700); text-decoration: none; }
.form-label-link:hover { color: var(--navy-900); }

.form-input-wrapper { position: relative; }
.form-input {
  width: 100%; padding: 0.75rem 1rem;
  border: 2px solid var(--slate-200); border-radius: var(--radius);
  background: var(--slate-50); color: var(--navy-900);
  font-size: 1rem; font-family: inherit;
  transition: all var(--transition);
}
.form-input::placeholder { color: var(--slate-400); }
.form-input:focus { outline: none; background: white; border-color: var(--navy-500); box-shadow: var(--shadow-input); }
.form-input-with-icon { padding-left: 2.75rem; }
.form-input-with-button { padding-right: 3rem; }
.form-input-icon { position: absolute; top: 50%; left: 1rem; transform: translateY(-50%); width: 1.25rem; height: 1.25rem; color: var(--slate-400); pointer-events: none; }
.form-input-button {
  position: absolute; top: 50%; right: 1rem; transform: translateY(-50%);
  background: none; border: none; color: var(--slate-400); cursor: pointer;
  padding: 0; display: flex; align-items: center;
}
.form-input-button:hover { color: var(--navy-700); }
.form-input-button svg { width: 1.25rem; height: 1.25rem; }

.form-help { margin: 0.375rem 0 0; font-size: 0.75rem; color: var(--slate-500); }
.form-error { display: flex; align-items: center; gap: 0.375rem; margin-top: 0.5rem; font-size: 0.875rem; color: var(--danger); }
.form-error svg { width: 1rem; height: 1rem; flex-shrink: 0; }

.form-checkbox { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; user-select: none; }
.form-checkbox input[type="checkbox"] { width: 1rem; height: 1rem; border-radius: 0.25rem; border: 2px solid var(--slate-300); accent-color: var(--navy-800); cursor: pointer; }
.form-checkbox span { font-size: 0.875rem; color: var(--slate-700); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 1.5rem; border-radius: var(--radius);
  font-family: inherit; font-size: 1rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none;
  transition: all var(--transition);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-full { width: 100%; }
.btn-primary { background: var(--navy-800); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--navy-900); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.btn-secondary { background: white; color: var(--navy-800); border: 2px solid var(--slate-200); }
.btn-secondary:hover:not(:disabled) { background: var(--navy-50); border-color: var(--navy-300); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-icon { width: 1.25rem; height: 1.25rem; }

.alert {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1rem; border-radius: var(--radius); border: 2px solid;
  font-size: 0.875rem; margin-bottom: 1rem;
}
.alert svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; margin-top: 0.125rem; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.alert strong { font-weight: 700; }

.divider { position: relative; margin: 2rem 0; text-align: center; }
.divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--slate-200); }
.divider span { position: relative; padding: 0 1rem; background: var(--slate-50); font-size: 0.75rem; font-weight: 600; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.1em; }

.hidden { display: none !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.text-sm { font-size: 0.875rem; } .text-xs { font-size: 0.75rem; }
.text-slate-500 { color: var(--slate-500); } .text-slate-600 { color: var(--slate-600); }
.font-semibold { font-weight: 600; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner { animation: spin 1s linear infinite; width: 1.25rem; height: 1.25rem; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease-out; }
