/* Signed-out pages (_AuthLayout): split screen — brand panel left, form right. */

:root {
  --auth-blue: #4F8EF7;       /* Annual Leave colour, so the login matches the app */
  --auth-blue-deep: #2B5FD9;
  --auth-ink: #1B2333;
  --auth-muted: #5F6B7E;
  --auth-line: #E3E8F0;
  --auth-bg: #F6F8FB;
}

html, body.auth-body {
  height: 100%;
}

body.auth-body {
  margin: 0;
  background: var(--auth-bg);
  color: var(--auth-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Brand panel ---------- */

.auth-brand {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1200px 600px at -10% -20%, rgba(255, 255, 255, 0.18), transparent 60%),
    radial-gradient(800px 500px at 120% 120%, rgba(46, 196, 182, 0.35), transparent 60%),
    linear-gradient(150deg, var(--auth-blue) 0%, var(--auth-blue-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.auth-brand::after {
  /* subtle dot texture */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.2px;
  margin-bottom: 40px;
}

.auth-logo-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.auth-headline {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 12px;
}

.auth-lead {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.auth-points {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 10px;
  color: rgba(255, 255, 255, 0.92);
}

.auth-points .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 10px;
  background: var(--c);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

/* Mini calendar card */

.mini-cal {
  background: rgba(255, 255, 255, 0.96);
  color: var(--auth-ink);
  border-radius: 16px;
  padding: 18px 18px 14px;
  box-shadow: 0 20px 45px rgba(16, 32, 80, 0.28);
  transform: rotate(-1.5deg);
}

.mini-cal-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  font-size: 0.8rem;
}

.mini-cal-dow {
  color: var(--auth-muted);
  font-weight: 600;
  font-size: 0.7rem;
  padding-bottom: 2px;
}

.mini-cal-day {
  position: relative;
  height: 34px;
  padding-top: 4px;
  border-radius: 8px;
  color: var(--auth-ink);
}

.mini-cal-day.weekend {
  color: #A8B1C0;
  background: #F4F6FA;
}

.mini-cal-day.today {
  background: var(--auth-blue);
  color: #fff;
  font-weight: 700;
}

.mini-cal-chips {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  display: flex;
  justify-content: center;
  gap: 3px;
}

.mini-cal-chips i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.mini-cal-day.today .mini-cal-chips i {
  box-shadow: 0 0 0 1.5px #fff;
}

/* ---------- Form side ---------- */

.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 24px;
}

.auth-main-inner {
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 420px;
}

.auth-card {
  width: 100%;
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: 18px;
  padding: 36px 32px 28px;
  box-shadow: 0 10px 30px rgba(27, 35, 51, 0.06);
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.auth-subtitle {
  color: var(--auth-muted);
  margin-bottom: 24px;
}

.auth-card .form-control {
  border-radius: 10px;
  border-color: #D5DCE6;
}

.auth-card .form-control:focus {
  border-color: var(--auth-blue);
  box-shadow: 0 0 0 0.25rem rgba(79, 142, 247, 0.2);
}

.auth-card .form-check-input:checked {
  background-color: var(--auth-blue);
  border-color: var(--auth-blue);
}

.auth-password .form-control {
  padding-right: 72px;
}

.auth-reveal {
  position: absolute;
  top: 9px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--auth-blue-deep);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  z-index: 5;
}

.auth-reveal:hover {
  background: #EEF3FE;
}

.auth-reveal:focus-visible {
  outline: 2px solid var(--auth-blue);
  outline-offset: 1px;
}

.invalid-text {
  display: block;
  color: #C0392B;
  font-size: 0.85rem;
  margin-top: 4px;
}

.auth-alert {
  background: #FDECEA;
  color: #A93226;
  border: 1px solid #F5C6C0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.92rem;
}

.auth-alert ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

/* The tag helper renders an empty summary when there are no errors — hide it then. */
.auth-alert.validation-summary-valid {
  display: none;
}

.auth-submit {
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  background: linear-gradient(150deg, var(--auth-blue) 0%, var(--auth-blue-deep) 100%);
  border: 0;
  box-shadow: 0 8px 18px rgba(43, 95, 217, 0.28);
  transition: transform 0.06s ease, box-shadow 0.15s ease;
}

.auth-submit:hover {
  box-shadow: 0 10px 22px rgba(43, 95, 217, 0.36);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-help {
  color: var(--auth-muted);
  font-size: 0.88rem;
  margin: 20px 0 0;
  text-align: center;
}

.auth-footer {
  color: #8A94A6;
  font-size: 0.8rem;
  padding-top: 24px;
}

/* ---------- Small screens: brand becomes a compact header ---------- */

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    padding: 28px 16px 72px;
  }

  .auth-logo {
    margin-bottom: 18px;
  }

  .auth-headline {
    font-size: 1.5rem;
  }

  .auth-lead {
    margin-bottom: 0;
  }

  .mini-cal,
  .auth-points {
    display: none;
  }

  .auth-main {
    padding: 0 16px 16px;
    margin-top: -48px; /* card overlaps the header a little */
  }

  .auth-card {
    padding: 28px 20px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-submit {
    transition: none;
  }
}
