/* Staff sign-in page (staff.html) — self-contained: a branded panel on the
   left, the sign-in card on the right; on phones just the card. */

:root {
  --sl-primary: #4a4dbc;
  --sl-primary-dark: #363990;
  --sl-navy: #14172a;
  --sl-accent: #f15a24;
  --sl-text: #1f2430;
  --sl-muted: #6b7280;
  --sl-border: #dfe3ee;
  --sl-danger: #d92d3a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none !important; }

body.sl-body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--sl-text);
  background: #f4f5fb;
  min-height: 100vh;
}

.sl-page { display: flex; min-height: 100vh; }

/* ------------------------------------------------------------ brand panel --- */
.sl-hero {
  position: relative;
  flex: 1 1 54%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 56px;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(241, 90, 36, 0.55), transparent 42%),
    radial-gradient(circle at 92% 88%, rgba(237, 28, 36, 0.35), transparent 38%),
    linear-gradient(140deg, #14172a 0%, #2b2f6e 42%, #4a4dbc 100%);
}
/* soft decorative rings */
.sl-hero::before, .sl-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.sl-hero::before { width: 520px; height: 520px; right: -160px; top: -140px; box-shadow: inset 0 0 0 60px rgba(255, 255, 255, 0.03); }
.sl-hero::after { width: 380px; height: 380px; left: -120px; bottom: -120px; box-shadow: inset 0 0 0 46px rgba(255, 255, 255, 0.03); }

.sl-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; letter-spacing: 0.01em; }
.sl-logo {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 16px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
}

.sl-hero-body { position: relative; z-index: 1; max-width: 520px; }
.sl-hero-body h1 { font-size: 38px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 14px; }
.sl-hero-body p { font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, 0.82); margin-bottom: 30px; }

.sl-points { list-style: none; display: grid; gap: 14px; }
.sl-points li { display: flex; align-items: center; gap: 14px; font-size: 15px; color: rgba(255, 255, 255, 0.92); }
.sl-points i {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; font-size: 15px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18);
}

.sl-hero-foot { position: relative; z-index: 1; font-size: 12.5px; color: rgba(255, 255, 255, 0.6); }

/* --------------------------------------------------------------- form side --- */
.sl-panel {
  flex: 1 1 46%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(74, 77, 188, 0.08), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(241, 90, 36, 0.07), transparent 40%),
    #f4f5fb;
}

.sl-card {
  width: 100%;
  max-width: 410px;
  background: #fff;
  border-radius: 18px;
  padding: 40px 36px 34px;
  box-shadow: 0 24px 60px rgba(20, 24, 46, 0.12), 0 2px 8px rgba(20, 24, 46, 0.05);
  animation: sl-rise 0.45s ease both;
}
@keyframes sl-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.sl-card-logo {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 18px; display: grid; place-items: center;
  font-size: 20px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--sl-primary), var(--sl-primary-dark));
  box-shadow: 0 10px 22px rgba(74, 77, 188, 0.35);
}
.sl-card h2 { text-align: center; font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.sl-sub { text-align: center; color: var(--sl-muted); font-size: 14px; margin-bottom: 24px; }

.sl-error {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 16px; padding: 10px 12px; border-radius: 10px;
  background: #fdecee; border: 1px solid #f6c6cb; color: #a3202b; font-size: 13px; line-height: 1.4;
}
.sl-error:empty { display: none; }
.sl-error::before { content: "\f071"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 13px; margin-top: 1px; }

.sl-field { margin-bottom: 16px; }
.sl-field label { display: block; font-size: 12.5px; font-weight: 600; color: #3a4154; margin-bottom: 6px; }
.sl-input { position: relative; }
.sl-input > i.lead {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #98a0b3; font-size: 14px; pointer-events: none;
  transition: color 0.15s;
}
.sl-input input {
  width: 100%; height: 48px; padding: 0 44px 0 42px; font: inherit; font-size: 15px; color: var(--sl-text);
  background: #fafbfe; border: 1.5px solid var(--sl-border); border-radius: 11px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.sl-input input::placeholder { color: #a9b0c0; }
.sl-input input:hover { border-color: #c9cfe0; }
.sl-input input:focus { border-color: var(--sl-primary); background: #fff; box-shadow: 0 0 0 4px rgba(74, 77, 188, 0.14); }
.sl-input input:focus ~ i.lead, .sl-input:focus-within > i.lead { color: var(--sl-primary); }
.sl-field.invalid .sl-input input { border-color: var(--sl-danger); }
.sl-field-error { color: var(--sl-danger); font-size: 12px; margin-top: 5px; min-height: 0; }
.sl-field-error:empty { display: none; }

.sl-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 9px;
  background: transparent; color: #8a92a6; cursor: pointer; font-size: 15px; display: grid; place-items: center;
}
.sl-eye:hover { background: #eef0f8; color: var(--sl-primary); }
.sl-eye:focus-visible { outline: 2px solid var(--sl-primary); }

.sl-btn {
  width: 100%; height: 50px; margin-top: 8px; border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 15.5px; font-weight: 700; color: #fff; letter-spacing: 0.01em;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--sl-primary) 0%, var(--sl-primary-dark) 100%);
  box-shadow: 0 10px 22px rgba(74, 77, 188, 0.32);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.sl-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(74, 77, 188, 0.4); filter: brightness(1.05); }
.sl-btn:active:not(:disabled) { transform: translateY(0); }
.sl-btn:disabled { opacity: 0.75; cursor: progress; }
.sl-btn:focus-visible { outline: 3px solid rgba(74, 77, 188, 0.45); outline-offset: 2px; }
.sl-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: sl-turn 0.7s linear infinite; }
@keyframes sl-turn { to { transform: rotate(360deg); } }

.sl-2fa-note { font-size: 13px; color: var(--sl-muted); text-align: center; margin-bottom: 14px; }
.sl-link { display: block; text-align: center; margin-top: 14px; font-size: 13px; color: var(--sl-primary); text-decoration: none; }
.sl-link:hover { text-decoration: underline; }

.sl-mobile-brand { display: none; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; font-weight: 800; font-size: 18px; color: var(--sl-primary-dark); }
.sl-mobile-brand .sl-logo { background: linear-gradient(135deg, var(--sl-primary), var(--sl-primary-dark)); border: 0; color: #fff; }

/* ------------------------------------------------------------------ small screens --- */
@media (max-width: 900px) {
  .sl-hero { display: none; }
  .sl-panel { flex-direction: column; padding: 24px 16px; }
  .sl-mobile-brand { display: flex; }
  .sl-card { padding: 32px 22px 28px; }
  .sl-card-logo { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sl-card { animation: none; }
  .sl-btn, .sl-input input { transition: none; }
}
