/* Okul Çizelgem — giriş sayfası. Yalnız auth/login.html yükler (landing-tokens.css'ten sonra).
   Her kural .lx altında: sınıf yalnız bu sayfanın <main> öğesinde. Paylaşılan app.css kuralları
   (label, input, .brand-mark, .legal-links) burada yalnız .lx içinde ezilir. */

body:has(> .lx) { background: var(--white); }

.lx {
  --lx-fast: 160ms;
  --lx-reveal: 600ms;
  --lx-ease: var(--ease-out);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.lx :where(h1, p) { margin: 0; }
.lx svg { display: block; }
.lx :focus-visible { outline: 2px solid var(--focus-on-light); outline-offset: 2px; }

.lx .login-split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh; min-height: 100svh;
}

/* ---------- Dark product panel ---------- */
.lx-panel {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 40px;
  padding: 36px clamp(32px, 5vw, 72px) clamp(56px, 10vh, 120px);
  background: var(--navy-950); color: var(--text-on-dark);
}
/* Schedule-paper grid and one soft glow, both still. */
.lx-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.5;
  background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(80% 70% at 35% 65%, #000, transparent 78%);
  mask-image: radial-gradient(80% 70% at 35% 65%, #000, transparent 78%);
}
.lx-panel::after {
  content: ""; position: absolute; z-index: -1; left: -35%; bottom: -55%; width: 120%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(29, 78, 216, 0.4), rgba(29, 78, 216, 0.1) 55%, transparent 72%);
}
.lx-brand { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; border-radius: 8px; color: var(--text-on-dark); text-decoration: none; }
.lx-brand:hover { text-decoration: none; }
.lx-panel .lx-brand:focus-visible { outline-color: var(--focus-on-dark); outline-offset: 4px; }
.lx .lx-brand .brand-mark { width: 32px; height: 32px; box-shadow: none; }
.lx-brand__name { font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
/* Centred in the space under the logo; the larger bottom padding lifts it slightly. */
.lx-panel__body { display: grid; gap: 40px; max-width: 520px; margin-block: auto; }
.lx-panel__lead {
  font-family: var(--font-display); font-size: clamp(32px, 3.2vw, 46px); font-weight: 650; line-height: 1.06;
  letter-spacing: -0.035em; text-wrap: balance;
}
/* A quiet duty week: places × days, filled cells only. */
.lx-week {
  display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(5, minmax(0, 1fr)); grid-auto-rows: 35px; gap: 6px;
  padding: 18px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(26, 45, 82, 0.78), rgba(14, 29, 56, 0.92));
  box-shadow: 0 0 0 1px rgba(143, 176, 255, 0.2), 0 40px 80px -40px rgba(2, 6, 16, 0.9);
}
.lx-week__day { align-self: end; font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: 0.08em; text-align: center; text-transform: uppercase; color: var(--text-muted-on-dark); }
.lx-week__place { align-self: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 500; color: var(--text-muted-on-dark); }
.lx-week__cell { border: 1px dashed rgba(143, 176, 255, 0.32); border-radius: 8px; }
.lx-week__cell.is-on {
  border: 0;
  background: color-mix(in srgb, var(--blue-600) 44%, var(--navy-900));
  box-shadow: inset 0 0 0 1px rgba(143, 176, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ---------- Form column ---------- */
.lx-main { display: flex; align-items: center; justify-content: center; padding: 48px clamp(24px, 5vw, 72px); background: var(--white); }
.lx-content { width: 100%; max-width: 440px; }
.lx-back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  margin: 0 0 28px -8px; padding: 0 12px 0 8px; border-radius: 999px;
  font-size: 14px; font-weight: 600; line-height: 20px; color: var(--ink-muted); text-decoration: none;
  transition: color var(--lx-fast) var(--lx-ease), background-color var(--lx-fast) var(--lx-ease);
}
.lx-back:hover { color: var(--ink); background: var(--paper); text-decoration: none; }
.lx-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lx-title { font-family: var(--font-display); font-size: clamp(30px, 2.8vw, 40px); font-weight: 650; line-height: 1.1; letter-spacing: -0.03em; color: var(--ink); }
.lx-lead { margin-top: 10px; font-size: 16px; line-height: 1.55; color: var(--ink-muted); }
.lx-flash {
  margin-top: 24px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--success) 28%, transparent);
  background: color-mix(in srgb, var(--success) 9%, var(--white));
  font-size: 14px; font-weight: 600; line-height: 20px; color: color-mix(in srgb, var(--success) 80%, #000);
}
.lx-form { display: grid; gap: 20px; margin-top: 28px; }
.lx .lx-label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 600; line-height: 20px; color: var(--ink); }
.lx .lx-input {
  width: 100%; max-width: none; height: 48px; margin: 0; padding: 0 14px;
  border: 1px solid var(--control-line); border-radius: 10px; background: var(--white); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; font-weight: 400; line-height: 24px;
  transition: border-color var(--lx-fast) var(--lx-ease);
}
.lx .lx-input:hover { border-color: var(--ink-muted); }
.lx .lx-input:focus-visible { border-color: var(--blue-600); }
.lx .lx-field.is-invalid .lx-input { border-color: var(--danger); }
/* Password: the reveal button sits inside the field; only shown when JS runs. */
.lx-pass { position: relative; }
.lx .lx-pass:has(.lx-reveal:not([hidden])) .lx-input { padding-right: 84px; }
.lx-reveal {
  position: absolute; top: 4px; right: 4px; bottom: 4px; min-width: 64px; padding: 0 12px;
  border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 600; line-height: 1; color: var(--blue-600);
  transition: background-color var(--lx-fast) var(--lx-ease);
}
.lx-reveal[hidden] { display: none; }
.lx-reveal:hover { background: var(--paper); }
.lx-reveal:active { background: #e3e9f5; }
.lx-caps { font-size: 13px; font-weight: 600; line-height: 18px; color: #8a5a00; }
.lx-caps:not(:empty) { margin-top: 8px; }
/* Server error: beside the fields it describes, firm but not loud. */
.lx-error {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 11px 14px 11px 12px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  background: color-mix(in srgb, var(--danger) 6%, var(--white));
  font-size: 14px; font-weight: 600; line-height: 20px; color: var(--danger);
}
.lx-error::before {
  content: "!"; display: grid; place-items: center; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  background: var(--danger); font-size: 12px; font-weight: 700; line-height: 1; color: var(--white);
}
.lx-forgot { display: flex; justify-content: flex-end; margin-top: -12px; }
.lx-link {
  display: inline-flex; align-items: center; min-height: 40px;
  font-weight: 600; color: var(--blue-600);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--blue-600) 35%, transparent);
  transition: text-decoration-color var(--lx-fast) var(--lx-ease);
}
.lx-link:hover { text-decoration-color: currentColor; }
.lx-forgot .lx-link { font-size: 14px; line-height: 20px; }
.lx-submit {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 0 20px;
  border: 0; border-radius: 10px; background: var(--blue-600); cursor: pointer;
  font-family: var(--font-sans); font-size: 16px; font-weight: 600; line-height: 20px; color: var(--white);
  box-shadow: 0 1px 2px rgba(10, 22, 40, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: background-color var(--lx-fast) var(--lx-ease);
}
.lx-submit:hover { background: var(--blue-700); }
.lx-submit:active { background: var(--blue-700); box-shadow: inset 0 2px 4px rgba(2, 6, 16, 0.3); }
.lx-submit:focus-visible { outline-offset: 3px; }
.lx-alt { margin-top: 24px; text-align: center; font-size: 14.5px; line-height: 20px; color: var(--ink-muted); }
/* Footer stays with the form: a hairline and a short gap, not the bottom of the screen. */
.lx-foot { display: grid; justify-items: center; gap: 2px; margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line-light); }
.lx .legal-links { gap: 0 16px; margin: 0; font-size: 13px; }
.lx .legal-links a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-muted); }
.lx .legal-links a:hover { color: var(--ink); }

/* ---------- One-time entrance, nothing loops ---------- */
@media (prefers-reduced-motion: no-preference) {
  .lx-panel__lead { animation: lx-rise var(--lx-reveal) var(--lx-ease) 60ms both; }
  .lx-week { animation: lx-rise var(--lx-reveal) var(--lx-ease) 160ms both; }
  .lx-week__cell.is-on { animation: lx-fill 420ms var(--lx-ease) both; animation-delay: calc(360ms + var(--d, 0) * 45ms); }
  .lx-content { animation: lx-rise var(--lx-reveal) var(--lx-ease) 40ms both; }
}
@keyframes lx-rise { from { opacity: 0; translate: 0 12px; } }
@keyframes lx-fill { from { opacity: 0; scale: 0.9; } }

/* ---------- Tablet and mobile: form first, the panel becomes a slim brand bar ---------- */
@media (max-width: 959px) {
  .lx .login-split { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .lx-panel { flex-direction: row; align-items: center; gap: 0; padding: 14px 20px; }
  .lx-panel::before, .lx-panel__body { display: none; }
  .lx-panel::after { left: -10%; bottom: -260%; width: 80%; }
  .lx-main { align-items: flex-start; padding: 16px 20px 32px; }
  .lx-back { margin-bottom: 20px; }
}
@media (max-width: 400px) {
  .lx-brand__name { font-size: 17px; }
  .lx-title { font-size: 26px; }
  .lx .lx-pass:has(.lx-reveal:not([hidden])) .lx-input { padding-right: 78px; }
}
