/* ==========================================================================
   Sign-in and contact-admin pages, Lagran UI.
   Left: a flat navy brand panel with one orange mark. Right: the form.
   ========================================================================== */
:root {
  --ink: #0f2036;
  --primary: #244568;
  --primary-strong: #1a3350;
  --primary-tint: #e5ecf4;
  --paper: #f1f4f8;
  --surface: #ffffff;
  --rule: #d8e0ea;
  --rule-strong: #b9c5d4;
  --text: #1c2733;
  --muted: #576679;
  --brick: #b3261e;
  --paid: #0f7b4f;
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body.auth-body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
}

/* ---- Ledger sheet -------------------------------------------------------- */
.auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: 56px 72px 64px 72px;
  color: #fff;
  background-color: var(--primary);
}
.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 72px;
  width: 44px;
  height: 4px;
  background: #e67a0b;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.auth-brand img { height: 50px; width: auto; border-radius: 10px; background: #fff; padding: 6px 12px; }
.auth-brand-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.auth-headline {
  max-width: 18ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.028em;
  color: #fff;
}

.auth-points {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 460px;
}
.auth-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.auth-points li::before { content: ''; flex: none; border-radius: 50%; background: #e67a0b; }

/* ---- Form pane ----------------------------------------------------------- */
.auth-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
}
.auth-card { width: 100%; max-width: 400px; }

.auth-card h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.auth-lead { margin: 0 0 28px; color: var(--muted); }

.auth-field { margin-bottom: 20px; }
.auth-field > label {
  display: block;
  margin-bottom: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.inputField { position: relative; }
.inputField > .bi:not(.toggle-password) {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--muted);
  pointer-events: none;
}
.inputField input,
.auth-card textarea {
  width: 100%;
  height: 48px;
  padding: 10px 14px 10px 42px;
  font-size: 16px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-card textarea { height: auto; min-height: 104px; padding-left: 14px; resize: vertical; }
.auth-card .no-icon input { padding-left: 14px; }
.inputField input:focus,
.auth-card textarea:focus {
  outline: none;
  border-color: #c46606;
  box-shadow: 0 0 0 3px rgba(230, 122, 11, 0.22);
}
.inputField input::placeholder,
.auth-card textarea::placeholder { color: #7e8b9d; opacity: 1; }

.toggle-password {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}
.toggle-password:hover { color: var(--primary); background: var(--primary-tint); }
.inputField:has(.toggle-password) input { padding-right: 48px; }

.auth-submit {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.auth-submit:hover { background: var(--primary-strong); border-color: var(--primary-strong); }

.auth-links { margin-top: 22px; font-size: 14px; }
.auth-links a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.auth-alert {
  margin: 0 0 22px;
  padding: 12px 14px;
  font-size: 14px;
  border: 1px solid;
  border-radius: 6px;
  border-left-width: 4px;
}
.auth-alert.is-inline { margin: 8px 0 0; padding: 8px 12px; }
.auth-alert.is-error { color: #7c1a14; background: #fcefee; border-color: var(--brick); }
.auth-alert.is-success { color: #0b5236; background: #e9f5ef; border-color: var(--paid); }
.auth-alert.is-info { color: var(--ink); background: var(--primary-tint); border-color: var(--primary); }

.auth :focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c46606; }

/* ---- Small screens ------------------------------------------------------- */
@media (max-width: 880px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand-panel { padding: 28px 24px; gap: 20px; }
  .auth-brand-panel::before { left: 24px; }
  .auth-headline { font-size: 28px; max-width: 22ch; }
  .auth-points { display: none; }
  .auth-pane { padding: 32px 20px 48px; align-items: flex-start; }
  .auth-card h1 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth *, .auth *::before, .auth *::after { transition: none !important; }
}

/* ---- Friendly colour: flat shapes on the navy panel, coloured list dots ---------------------------------------- */
.auth-brand-panel {
  background-image:
    radial-gradient(circle at 86% 16%, #e67a0b 0 74px, transparent 75px),
    radial-gradient(circle at 96% 46%, #14a89b 0 44px, transparent 45px),
    radial-gradient(circle at 72% 38%, #e0457b 0 26px, transparent 27px),
    radial-gradient(circle at 62% 12%, #22a05a 0 18px, transparent 19px),
    radial-gradient(circle at 90% 84%, #3b82f6 0 60px, transparent 61px);
  background-repeat: no-repeat;
}
.auth-points li:nth-child(1)::before { background: #e67a0b; }
.auth-points li:nth-child(2)::before { background: #14a89b; }
.auth-points li:nth-child(3)::before { background: #e0457b; }
.auth-points li::before { width: 10px; height: 10px; }
@media (max-width: 880px) { .auth-brand-panel { background-image: radial-gradient(circle at 92% 30%, #e67a0b 0 36px, transparent 37px), radial-gradient(circle at 78% 70%, #14a89b 0 20px, transparent 21px); } }

/* The leading icon stays visible while typing and takes the brand colour when the field has focus */
.inputField > .bi:not(.toggle-password) { z-index: 1; transition: color 0.15s ease; }
.inputField:focus-within > .bi:not(.toggle-password) { color: var(--primary); }
