/* ==========================================================================
   Kaizen — auth pages (login, register). Needs kaizen-ui.css first.
   ========================================================================== */
body.ka-body { min-height: 100vh; margin: 0; background: var(--k-bg); }
.ka-body *, .ka-body *::before, .ka-body *::after { box-sizing: border-box; }
.ka-body a { text-decoration: none; }
.ka-body a:hover { text-decoration: underline; }
.ka-body .k-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.ka-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }

/* Brand panel */
.ka-side {
  position: relative; overflow: hidden; color: #dbe6ff; padding: 30px 32px;
  background: linear-gradient(155deg, #0f2f6b 0%, #1a5fd0 52%, #0e9fae 82%, #3c9a2e 120%);
  display: flex; flex-direction: column;
}
.ka-side::after {
  content: ''; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -200px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 65%);
}
.ka-side > * { position: relative; z-index: 1; }
.ka-side h2 { color: #fff; font-size: clamp(1.3rem, 2vw, 1.65rem); line-height: 1.2; letter-spacing: -.02em; margin: auto 0 10px; }
.ka-side p { color: #c9d8f7; line-height: 1.55; margin: 0 0 18px; font-size: .9rem; }
.ka-points { list-style: none; padding: 0; margin: 0 0 auto; display: grid; gap: 10px; }
.ka-points li { display: flex; gap: 10px; align-items: center; font-size: .86rem; color: #eef3ff; }
.ka-points i { width: 24px; height: 24px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.14); color: #bef264; font-size: .85rem; }
.ka-quote { margin-top: 22px; padding: 12px 14px; border-radius: 12px; font-size: .82rem !important; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-size: .9rem; line-height: 1.6; color: #eef3ff; }
.ka-quote b { display: block; margin-top: 8px; font-size: .82rem; color: #c9d8f7; }

/* Form panel */
.ka-main { display: flex; flex-direction: column; padding: 18px 20px; }
.ka-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 420px; width: 100%; margin: 0 auto; font-size: .86rem; color: var(--k-muted); }
.ka-top a { font-weight: 700; }
.ka-top .ka-logo-m { display: none; }
.ka-card { width: 100%; max-width: 420px; margin: auto; padding: 20px 0; }
.ka-card.wide { max-width: 470px; }
.ka-card h1 { font-size: clamp(1.35rem, 2.4vw, 1.6rem); letter-spacing: -.02em; margin: 0 0 4px; }
.ka-card .ka-sub { color: var(--k-muted); margin: 0 0 18px; font-size: .9rem; }
.ka-field { margin-bottom: 12px; }
.ka-field label { display: block; font-size: .8rem; font-weight: 700; color: var(--k-ink-2); margin-bottom: 5px; }
.ka-input { position: relative; }
.ka-input > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--k-subtle); font-size: .9rem; pointer-events: none; }
.ka-input input, .ka-input select, .ka-field textarea, .ka-field > input, .ka-field > select {
  width: 100%; min-height: 44px; padding: 9px 12px 9px 38px; border-radius: 10px;
  border: 1.5px solid var(--k-border-2); background: var(--k-surface); color: var(--k-ink);
  font: 500 .92rem var(--k-font); transition: border-color .15s, box-shadow .15s;
}
.ka-field > input, .ka-field > select, .ka-field textarea { padding-left: 12px; }
.ka-input input:focus, .ka-input select:focus, .ka-field > input:focus, .ka-field > select:focus, .ka-field textarea:focus {
  outline: 0; border-color: var(--k-blue-500); box-shadow: 0 0 0 4px rgba(26,95,208,.12);
}
.ka-input .ka-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; width: 36px; height: 36px; border-radius: 8px; color: var(--k-subtle); cursor: pointer; }
.ka-input .ka-eye:hover { color: var(--k-blue-600); background: var(--k-surface-2); }
.ka-hint { font-size: .74rem; color: var(--k-muted); margin-top: 4px; }
.ka-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 2px 0 16px; font-size: .84rem; }
.ka-row label { display: inline-flex; gap: 8px; align-items: center; color: var(--k-ink-2); cursor: pointer; }
.ka-row input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--k-blue-600); }
.ka-divider { display: flex; align-items: center; gap: 14px; color: var(--k-subtle); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin: 14px 0; }
.ka-divider::before, .ka-divider::after { content: ''; flex: 1; height: 1px; background: var(--k-border); }
.ka-google { width: 100%; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 12px; border: 1.5px solid var(--k-border-2); background: var(--k-surface); color: var(--k-ink); font: 700 .95rem var(--k-font); cursor: pointer; }
.ka-google:hover { background: var(--k-surface-2); }
.ka-google svg { width: 18px; height: 18px; }
.ka-foot { text-align: center; margin-top: 16px; color: var(--k-muted); font-size: .88rem; }
.ka-foot a { font-weight: 700; }
.ka-alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-size: .86rem; font-weight: 600; }
.ka-alert.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.ka-alert.ok  { background: var(--k-green-50); color: var(--k-green-700); border: 1px solid rgba(60,154,46,.25); }
[data-theme="dark"] .ka-alert.err { background: rgba(185,28,28,.15); color: #fca5a5; border-color: rgba(252,165,165,.25); }
.ka-alert i { margin-top: 2px; }

/* Role picker (register) */
.ka-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.ka-role { position: relative; display: flex; gap: 10px; align-items: center; padding: 9px 11px; border-radius: 12px; border: 1.5px solid var(--k-border-2); background: var(--k-surface); cursor: pointer; transition: border-color .15s, background .15s; }
.ka-role input { position: absolute; opacity: 0; pointer-events: none; }
.ka-role i { width: 30px; height: 30px; font-size: .85rem; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--k-surface-2); color: var(--k-muted); }
.ka-role b { display: block; font-size: .88rem; line-height: 1.2; }
.ka-role span { font-size: .72rem; color: var(--k-muted); }
.ka-role:has(input:checked), .ka-role.on { border-color: var(--k-blue-600); background: var(--k-blue-50); }
.ka-role:has(input:checked) i, .ka-role.on i { background: var(--k-blue-600); color: #fff; }
.ka-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.ka-terms { font-size: .78rem; color: var(--k-muted); margin: 4px 0 14px; display: flex; gap: 8px; align-items: flex-start; }

@media (max-width: 960px) {
  .ka-shell { grid-template-columns: 1fr; }
  .ka-side { display: none; }
  .ka-top .ka-logo-m { display: block; }
}
@media (max-width: 520px) {
  .ka-card { padding: 12px 0; }
  .ka-main { padding: 14px 16px; }
}
.ka-body .k-btn-lg { min-height: 46px; padding: 0 20px; font-size: .95rem; }
@media (max-width: 360px) { .ka-grid2, .ka-roles { grid-template-columns: 1fr; } }
@media (max-height: 760px) and (min-width: 961px) { .ka-points { display: none; } }

/* ==========================================================================
   Card layout (v3): centred two-pane card on a soft brand background
   ========================================================================== */
body.ka-body {
  display: flex; align-items: center; justify-content: center; padding: 28px 16px;
  background:
    radial-gradient(900px 520px at 8% 0%, rgba(26,95,208,.14), transparent 60%),
    radial-gradient(800px 520px at 100% 100%, rgba(88,184,43,.12), transparent 60%),
    var(--k-bg);
}
.ka-shell {
  width: min(1040px, 100%); min-height: 0; grid-template-columns: 360px minmax(0, 1fr);
  background: var(--k-surface); border: 1px solid var(--k-border); border-radius: 24px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(15, 35, 80, .16);
}
.ka-side { padding: 30px 30px 26px; }
.ka-side h2 { margin-top: 36px; }
.ka-logo-chip { display: inline-flex; align-items: center; background: #fff; padding: 9px 14px; border-radius: 14px; box-shadow: 0 6px 18px rgba(8,25,60,.18); align-self: flex-start; }
.ka-logo-chip img { height: 38px; width: auto; display: block; }
.ka-main { padding: 26px 40px 30px; justify-content: center; }
.ka-top { max-width: none; }
.ka-card { max-width: 440px; padding: 18px 0 6px; }
.ka-card.wide { max-width: 520px; }
@media (min-width: 1500px) { .ka-shell { width: min(1120px, 100%); } }
@media (max-width: 900px) {
  body.ka-body { padding: 0; align-items: stretch; }
  .ka-shell { grid-template-columns: 1fr; border-radius: 0; border: 0; box-shadow: none; min-height: 100vh; }
  .ka-main { padding: 16px 18px 28px; justify-content: flex-start; }
}

/* College code — a separate, optional box only for students of partner colleges */
.ka-college { margin: 4px 0 14px; border: 1.5px dashed var(--k-border-2); border-radius: 12px; background: var(--k-surface-2, #f8fafc); }
.ka-college[hidden] { display: none; }
.ka-college > summary { list-style: none; display: flex; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; }
.ka-college > summary::-webkit-details-marker { display: none; }
.ka-college-ic { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: var(--k-blue-50, #eff6ff); color: var(--k-blue-600, #2563eb); }
.ka-college-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ka-college-txt b { font-size: .84rem; color: var(--k-ink); }
.ka-college-txt small { font-size: .72rem; color: var(--k-muted); line-height: 1.35; }
.ka-college-tag { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--k-muted); border: 1px solid var(--k-border-2); border-radius: 999px; padding: 2px 8px; }
.ka-college[open] > summary { border-bottom: 1px dashed var(--k-border-2); }
.ka-college[open] .ka-college-tag::after { content: " ▴"; }
.ka-college:not([open]) .ka-college-tag::after { content: " ▾"; }
.ka-college-body { padding: 10px 12px 12px; }

