/* modern theme — sign-in page. Colours come from modern.css (palette + light/dark tokens). */
.l-body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg);
  font-family: var(--f-body); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
.l-body *, .l-body *::before, .l-body *::after { box-sizing: border-box; }
.l-noscript { padding: 10px 16px; background: var(--warn-soft); color: var(--warn); text-align: center; }

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

/* ---- brand panel ---- */
.l-brand {
  position: relative; overflow: hidden; display: flex; align-items: center;
  padding: 56px clamp(32px, 6vw, 88px); color: #fff;
  background:
    radial-gradient(120% 90% at 0% 100%, color-mix(in srgb, var(--p-hi) 26%, transparent) 0%, transparent 55%),
    linear-gradient(150deg, color-mix(in srgb, var(--p-accent) 78%, #000) 0%, var(--p-side) 70%);
}
.l-rings { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.l-rings circle { fill: none; stroke: #fff; stroke-opacity: .07; stroke-width: 1.5; }
.l-brand { justify-content: center; }
.l-icon {
  position: relative; display: grid; place-items: center;
  width: clamp(200px, 22vw, 280px); aspect-ratio: 1; border-radius: 36%;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .12);
  backdrop-filter: blur(6px);
}
.l-icon svg { width: 52%; height: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .25)); }
.l-icon-sheet { fill: rgba(255, 255, 255, .95); }
.l-icon-clip { fill: color-mix(in srgb, var(--p-hi) 90%, #fff); }
.l-icon-bar { fill: color-mix(in srgb, var(--p-accent) 75%, #fff); }
.l-icon-bar.is-hi { fill: var(--p-accent); }
.l-icon-line { stroke: var(--p-hi); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.l-icon-dot { fill: var(--p-hi); }

/* ---- form side ---- */
.l-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 24px; }
.l-card {
  width: 100%; max-width: 420px; padding: 36px 34px 30px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow), 0 24px 60px color-mix(in srgb, var(--p-ink) 9%, transparent);
}
.l-mobile-brand { display: none; width: 56px; height: 56px; margin-bottom: 20px; padding: 10px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.l-mobile-brand svg { width: 100%; height: 100%; }
.l-pane h2 { margin: 0 0 4px; font: 700 26px/1.3 var(--f-display); color: var(--ink); }
.l-sub { margin: 0 0 24px; color: var(--muted); font-size: 14.5px; }
.l-form { display: grid; gap: 16px; }
.l-field { display: grid; gap: 6px; margin: 0; font-weight: 400; }
.l-field > span:first-child { font: 600 14px/1.4 var(--f-display); color: var(--fg); }
.l-input {
  position: relative; display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface-2); transition: border-color .15s, box-shadow .15s, background .15s;
}
.l-input:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.l-input > svg { flex: none; width: 19px; height: 19px; margin-left: 13px; fill: var(--muted); }
.l-input:focus-within > svg { fill: var(--accent); }
.l-input input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px 0 11px; border: 0; outline: 0; background: transparent;
  color: var(--fg); font: 15.5px var(--f-body);
}
.l-input input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.l-input input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--surface-2) inset; -webkit-text-fill-color: var(--fg); }
.l-eye { flex: none; width: 44px; height: 44px; margin-right: 2px; border: 0; background: none; cursor: pointer; border-radius: 10px; display: grid; place-items: center; }
.l-eye svg { width: 20px; height: 20px; fill: var(--muted); }
.l-eye.is-on svg, .l-eye:hover svg { fill: var(--accent); }
.l-eye:focus-visible { outline: 2px solid var(--accent); }
.l-captcha { display: flex; align-items: center; gap: 10px; }
.l-captcha img { border-radius: 8px; max-width: 100%; }
.l-reload { font-size: 22px; text-decoration: none; color: var(--accent); }

.l-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: -2px; }
.l-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; font-size: 14px; cursor: pointer; color: var(--fg); }
.l-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.l-link { color: var(--accent); font: 600 14px var(--f-display); text-decoration: none; }
.l-link:hover { text-decoration: underline; }

.l-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; margin-top: 4px;
  border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); cursor: pointer;
  font: 600 16.5px/1 var(--f-display); text-decoration: none; letter-spacing: .2px;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent); transition: transform .12s, box-shadow .15s, filter .15s;
}
.l-btn svg { width: 20px; height: 20px; fill: currentColor; }
.l-btn:hover { filter: brightness(1.07); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 38%, transparent); color: var(--on-accent); text-decoration: none; }
.l-btn:active { transform: translateY(1px); }
.l-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.l-btn.is-ghost { background: transparent; color: var(--accent); box-shadow: none; height: 44px; margin-top: 0; }
.l-btn.is-ghost:hover { background: var(--accent-soft); color: var(--accent); }
.l-btn.is-busy { opacity: .75; cursor: progress; }
.l-btn.is-busy svg { display: none; }
.l-btn.is-busy::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: l-spin .7s linear infinite; }
@keyframes l-spin { to { transform: rotate(360deg); } }

.l-alert { margin: 0 0 18px; padding: 11px 14px; border-radius: 12px; font-size: 14px; border: 1px solid transparent; }
.l-alert p, .l-alert ul { margin: 0; padding: 0; list-style: none; }
.l-alert.is-bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.l-alert.is-good { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 25%, transparent); }
.l-alert.is-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }

.l-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.l-hint { margin: -4px 0 0; font-size: 13px; color: var(--muted); }
.l-foot-note { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.l-copy { margin: 22px 0 0; font-size: 13px; color: var(--muted); }

/* ---- smaller screens: the brand panel steps aside ---- */
@media (max-width: 900px) {
  .l-shell { grid-template-columns: 1fr; }
  .l-brand { display: none; }
  .l-side {
    min-height: 100vh; padding: 28px 16px 20px;
    background:
      radial-gradient(90% 50% at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 70%),
      radial-gradient(80% 40% at 0% 100%, color-mix(in srgb, var(--hi) 12%, transparent) 0%, transparent 70%);
  }
  .l-mobile-brand { display: block; }
}
@media (max-width: 460px) {
  .l-card { padding: 26px 20px 22px; border-radius: 18px; }
  .l-grid { grid-template-columns: 1fr; }
  .l-pane h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { .l-btn, .l-input { transition: none; } .l-btn.is-busy::after { animation: none; } }

/* Older phone browsers (Android Chrome before 111, Samsung Internet, UC, older iPhones) do not know
   color-mix(): the theme colours built with it would be lost (no borders, invisible boxes). Plain colours instead. */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --bg: #eef1f6; --surface: #ffffff; --surface-2: #f4f6fa; --line: #dde3ec; --fg: #1d2330; --muted: #5d6878;
    --ink: #13264d; --accent: #2350a8; --accent-soft: #e6edf8; --on-accent: #ffffff; --hi: #d9951a; --hi-soft: #fbf1de;
    --good: #1d8a55; --good-soft: #e2f4ea; --warn: #b7791f; --warn-soft: #fdf1dc; --bad: #c0392b; --bad-soft: #fbe5e2;
    --shadow: 0 1px 2px rgba(19, 38, 77, .07), 0 4px 16px rgba(19, 38, 77, .07);
  }
  :root[data-theme="dark"] {
    --bg: #0b0e14; --surface: #121722; --surface-2: #161b25; --line: #263042; --fg: #e5e9f0; --muted: #98a2b3;
    --ink: #dce6fa; --accent: #7aa2f0; --accent-soft: #1b2638; --on-accent: #0b1020; --bad: #ef7b6d; --bad-soft: #3d1c18;
    --good: #4cc487; --good-soft: #173527; --warn: #e3aa4c; --warn-soft: #3a2c13; --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
  .l-brand { background: #1c3a75; }
  .l-input:focus-within { box-shadow: 0 0 0 3px rgba(35, 80, 168, .18); }
  .l-btn { box-shadow: 0 6px 16px rgba(35, 80, 168, .25); }
  .l-alert.is-bad { border-color: #f1c3bd; }
  .l-alert.is-good { border-color: #bfe3cf; }
  .l-alert.is-warn { border-color: #f0d6a8; }
}
