/* Sign-in page: a dark, quiet backdrop with a single elevated card (same tokens as layout.css) */
:root {
  --brand: #c2570c;
  --brand-600: #d9650f;
  --brand-700: #9a3f0a;
  --brand-ring: rgba(224, 112, 20, 0.2);
  --brand-gradient: linear-gradient(135deg, #f6b42b 0%, #ee8a17 52%, #e0601a 100%);
  --brand-gradient-hover: linear-gradient(135deg, #f8bf45 0%, #f19628 52%, #e56d26 100%);
  --accent: #f2b544;
  --ink: #1c1917;
  --text: #1c1917;
  --text-2: #44403c;
  --text-muted: #78716c;
  --text-faint: #a8a29e;
  --border-strong: #dad5cf;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background:
    radial-gradient(60% 70% at 15% 10%, rgba(240, 150, 30, 0.35) 0%, transparent 60%),
    radial-gradient(50% 60% at 90% 100%, rgba(242, 181, 68, 0.14) 0%, transparent 60%),
    #120e0f;
  font-family: var(--font);
  letter-spacing: -0.006em;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
/* Faint grid texture over the backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.login-shell {
  position: relative;
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 40px 80px -24px rgba(0, 0, 0, 0.7);
  animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Brand panel */
.login-brand {
  position: relative;
  padding: 3rem;
  color: #fff;
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(240, 150, 30, 0.55) 0%, transparent 60%),
    linear-gradient(160deg, #241a1d 0%, #160f11 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-brand::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(242, 181, 68, 0.55), transparent);
}
.brand-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2.25rem; }
/* Plain gradient square (no icon), same as the sidebar */
.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: var(--brand-gradient);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 10px 24px -8px rgba(240, 150, 30, 0.8);
}
.brand-name { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; }
.login-brand h2 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin-bottom: 0.85rem;
}
.login-brand .brand-lead { margin: 0; color: rgba(255, 255, 255, 0.68); font-size: 0.98rem; line-height: 1.55; }

/* Name and tagline above the form, on phones only (the brand panel is hidden there) */
.mobile-brand { display: none; align-items: center; gap: 0.7rem; margin-bottom: 1.75rem; }
.mobile-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.mobile-brand .brand-name { display: block; font-size: 1.15rem; line-height: 1.2; color: var(--text); }
.mobile-tagline { display: block; font-size: 0.75rem; color: var(--text-muted); }

/* Form panel */
.login-card { padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.login-card h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 0.35rem; }
.login-card .subtitle { color: var(--text-muted); margin-bottom: 1.75rem; }

.form-label { font-weight: 500; font-size: 0.84rem; color: var(--text-2); }
.input-icon { position: relative; }
.input-icon > i,
.input-icon > svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}
.input-icon .form-control {
  padding: 0.7rem 2.6rem 0.7rem 2.5rem;
  border-radius: 11px;
  border-color: var(--border-strong);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input-icon .form-control:hover:not(:focus) { border-color: #c9c3bc; }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
/* Show / hide password (password_toggle.js), the same button as every other password field */
.toggle-password {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text-faint);
}
.toggle-password:hover,
.toggle-password:focus-visible { color: var(--brand); background: rgba(224, 112, 20, 0.08); outline: none; }

/* "or" and Continue with Google */
.or-divider { display: flex; align-items: center; gap: 12px; margin: 1.25rem 0; color: var(--text-faint); font-size: 0.8rem; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: #e9e6e2; }
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-google:hover { background: #fbfaf9; border-color: #c9c3bc; color: var(--text); }
.btn-google:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); }

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand-700);
  --bs-btn-hover-bg: var(--brand-600);
  --bs-btn-hover-border-color: var(--brand-700);
  --bs-btn-active-bg: var(--brand-700);
  --bs-btn-active-border-color: var(--brand-700);
  --bs-btn-focus-shadow-rgb: 224, 112, 20;
  border-radius: 11px;
  font-size: 0.975rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  --bs-btn-border-color: #d9650f;
  --bs-btn-hover-border-color: #d9650f;
  background-image: var(--brand-gradient);
  text-shadow: 0 1px 1px rgba(120, 45, 0, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 2px rgba(154, 63, 10, 0.35), 0 10px 24px -10px rgba(224, 112, 20, 0.8);
  transition: box-shadow 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover { background-image: var(--brand-gradient-hover); }
.btn-primary:active { transform: translateY(0.5px); }
.help-text { margin: 1.5rem 0 0; text-align: center; font-size: 0.84rem; color: var(--text-muted); }
.alert-danger { border-radius: 11px; font-size: 0.875rem; background: #fef3f2; border-color: #f1c4c0; color: #912018; }

@media (max-width: 767.98px) {
  .login-shell { grid-template-columns: 1fr; max-width: 420px; }
  .login-brand { display: none; }
  .mobile-brand { display: flex; }
  .login-card { padding: 2.25rem 1.5rem; }
}

.help-text a { color: var(--brand); font-weight: 600; text-decoration: none; }
.help-text a:hover { text-decoration: underline; }
