/* ============================================================
   login.css — EdChimp Sign-In Page
   Matches the split-panel layout established in st-register.css
   ============================================================ */

/* ── Shell layout ── */
body.login-page {
  min-height: 100vh;
  margin: 0;
  background: var(--bg-page);
}

.login-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Left: Brand panel ── */
.login-brand {
  flex: 0 0 42%;
  background: linear-gradient(160deg, #0a1628 0%, #1c2b4a 55%, #0e7490 100%);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.login-brand::after {
  content: '';
  position: absolute;
  bottom: -120px;
  right: -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38,194,234,0.14) 0%, transparent 70%);
  pointer-events: none;
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.login-brand-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: #fff;
}

.login-brand-headline {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
}

.login-brand-sub {
  font-size: 13px;
  opacity: 0.75;
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 360px;
}

/* Portal list */
.login-portal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.lpl-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 4px;
}

.lpl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.lpl-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lpl-name {
  font-weight: 700;
  color: #fff;
  min-width: 160px;
}

.lpl-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

.login-brand-trust {
  font-size: 11px;
  opacity: 0.5;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Right: Form panel ── */
.login-form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--bg-card);
}

.login-form-card {
  width: 100%;
  max-width: 440px;
}

.login-form-eyebrow {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--cyan-primary);
  margin-bottom: 6px;
}

.login-form-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: var(--azure-10);
  margin: 0 0 6px;
}

.login-form-sub {
  font-size: 13px;
  color: var(--azure-59);
  margin: 0 0 24px;
}

.login-form-sub a {
  color: var(--cyan-primary);
  font-weight: 600;
}

/* ── Form fields ── */
.login-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-forgot {
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan-primary);
  text-decoration: none;
}

.login-forgot:hover { color: var(--cyan-dark); }

.login-pw-wrap {
  position: relative;
}

.login-pw-wrap .form-input {
  padding-right: 44px;
  width: 100%;
}

.login-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--azure-59);
  padding: 4px;
  line-height: 1;
}

.login-pw-toggle:hover { color: var(--azure-10); }

.login-remember {
  margin-top: -4px;
}

.login-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--azure-35);
  cursor: pointer;
}

.login-check-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan-primary);
  cursor: pointer;
}

.login-submit-btn {
  padding: 13px 24px;
  font-size: 15px;
  margin-top: 4px;
}

/* ── Divider ── */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  color: var(--azure-59);
  font-size: 12px;
  font-weight: 600;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

/* ── Role quick-access grid ── */
.login-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.login-role-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--azure-20);
  text-decoration: none;
  transition: all 0.15s;
}

.login-role-card:hover {
  border-color: var(--cyan-primary);
  background: var(--bg-hover);
  color: var(--azure-10);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.lrc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lrc-name {
  font-size: 12px;
  line-height: 1.35;
}

/* ── Role select list (post-login view) ── */
.login-role-select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.lrs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.15s;
}

.lrs-item:hover {
  border-color: var(--cyan-primary);
  background: var(--bg-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.lrs-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lrs-body { flex: 1; }

.lrs-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--azure-10);
  margin-bottom: 2px;
}

.lrs-desc {
  font-size: 12px;
  color: var(--azure-59);
}

.lrs-arrow {
  color: var(--cyan-primary);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

/* ── Forgot password ── */
.login-back-btn {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--azure-59);
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
  display: block;
  transition: color 0.15s;
}

.login-back-btn:hover { color: var(--azure-10); }

/* ── Confirm / sent view ── */
.login-confirm-icon {
  font-size: 48px;
  margin-bottom: 16px;
  text-align: center;
}

.login-confirm-tips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.lct-item {
  font-size: 13px;
  color: var(--azure-35);
  line-height: 1.5;
}

.lct-item a { color: var(--cyan-primary); font-weight: 600; }

/* ── Page footer ── */
.login-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  font-size: 12px;
  color: var(--azure-59);
}

.login-footer a {
  color: var(--azure-59);
  text-decoration: none;
  transition: color 0.15s;
}

.login-footer a:hover { color: var(--cyan-primary); }

.lf-dot { color: var(--border-mid); }

/* ── Error state ── */
.login-error {
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: #dc2626;
  font-weight: 600;
  display: none;
}

.login-error.visible { display: block; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .login-brand { display: none; }
  .login-form-panel { padding: 32px 20px; }
  .login-form-card { max-width: 100%; }
  .login-role-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .login-form-title { font-size: 20px; }
  .login-form-panel { padding: 24px 16px; }
}
