/* ── FillAI Login Page — Webdock-inspired clean design ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --login-bg: #f8f9fb;
  --card-bg: #ffffff;
  --brand-bg: #0a0e17;
  --brand-text: #f0f2f5;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --accent-light: rgba(34, 197, 94, 0.08);
  --text: #111827;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --border-focus: #22c55e;
  --input-bg: #f9fafb;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 24px rgba(0,0,0,.08);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--login-bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ── Split layout ── */
.login-page {
  display: flex;
  min-height: 100vh;
}

/* ── Left brand panel ── */
.login-brand {
  flex: 0 0 44%;
  background: var(--brand-bg);
  color: var(--brand-text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(34,197,94,.15), transparent 70%);
  pointer-events: none;
}

.login-brand::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(34,197,94,.08), transparent 70%);
  pointer-events: none;
}

.brand-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.brand-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: -.3px;
}

.brand-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.5px;
  margin-bottom: 1rem;
}

.brand-content > p {
  font-size: 1rem;
  color: #9ca3af;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 2.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: #d1d5db;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(34,197,94,.2);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.brand-trust {
  font-size: .8rem;
  color: #6b7280;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* ── Right form panel ── */
.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-header {
  margin-bottom: 2rem;
}

.login-header h2 {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .375rem;
  letter-spacing: -.3px;
}

.login-header p {
  color: var(--text-secondary);
  font-size: .875rem;
}

/* ── Form ── */
.form-group {
  margin-bottom: 1.125rem;
}

.form-group label {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: .375rem;
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .875rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.form-group input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(34,197,94,.12);
  background: #fff;
}

.form-group input::placeholder {
  color: #9ca3af;
}

.form-group input[readonly] {
  background: #f3f4f6;
  color: #6b7280;
}

.form-hint {
  display: block;
  font-size: .75rem;
  color: var(--text-secondary);
  margin-top: .25rem;
}

/* ── Buttons ── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:active {
  transform: scale(.99);
}

.btn-primary:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.btn-google:hover {
  border-color: #d1d5db;
  box-shadow: var(--shadow-sm);
}

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.25rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  font-size: .75rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── Footer ── */
.login-footer {
  margin-top: 1.75rem;
  text-align: center;
}

.login-footer > p {
  font-size: .8125rem;
  color: var(--text-secondary);
}

.login-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.login-footer a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: .75rem;
}

.footer-links a {
  font-size: .75rem;
  color: #9ca3af;
  font-weight: 400;
}

/* ── Toast ── */
.login-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: .8125rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 100;
  animation: toastIn .2s ease;
}

.toast-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.toast-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.toast-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Spinner ── */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utilities ── */
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .login-page { flex-direction: column; }
  .login-brand {
    flex: none;
    padding: 2rem 1.5rem;
    min-height: auto;
  }
  .brand-content h1 { font-size: 1.5rem; }
  .brand-features { display: none; }
  .brand-trust { display: none; }
  .login-form-panel { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .login-brand { padding: 1.5rem 1rem; }
  .brand-content > p { display: none; }
  .login-card { max-width: none; }
}
