/* ====================================================================
   GSB School Banking — Login Page (Modern split layout)
   ==================================================================== */

:root {
  /* Phase 5.15 — aligned to Linkage Center palette (Material Pink). */
  --pink:        #E91E63;   /* Pink 500  */
  --pink-dark:   #D81B60;   /* Pink 600  */
  --pink-darker: #AD1457;   /* Pink 800  */
  --pink-light:  #F8BBD0;   /* Pink 100  */
  --pink-bg:     #FCE4EC;   /* Pink 50   */
  --rose-text:   #880E4F;   /* Pink 900  */
  --gray-50:  #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;
}

* { box-sizing: border-box; }

body.login-page {
  margin: 0;
  min-height: 100vh;
  font-family: 'Prompt', 'Sarabun', system-ui, sans-serif;
  background:
    radial-gradient(circle at 15% 20%, #FCE4EC 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, #F8BBD0 0%, transparent 40%),
    linear-gradient(135deg, #FFF5F8 0%, #FCE4EC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  color: var(--gray-900);
  position: relative;
  overflow-x: hidden;
}

/* Floating background blobs */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.bg-blob-tl { width: 400px; height: 400px; background: #E91E63; top: -120px; left: -120px; }
.bg-blob-br { width: 480px; height: 480px; background: #AD1457; bottom: -160px; right: -160px; opacity: 0.25; }

/* ════════════════════════ Main shell ════════════════════════ */
.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  width: 100%;
  max-width: 1080px;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(173, 20, 87, 0.18), 0 4px 12px rgba(0,0,0,0.04);
  min-height: 680px;
  animation: shellEnter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shellEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 920px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 480px;
    min-height: auto;
  }
  .hero-features { display: none; }
  .hero-panel { padding: 2rem 2rem 1.5rem !important; min-height: auto !important; }
  .hero-bottom { display: none; }
}

/* ════════════════════════ Hero panel ════════════════════════ */
.hero-panel {
  position: relative;
  background:
    radial-gradient(circle at 80% 20%, rgba(233, 30, 99,0.12) 0%, transparent 50%),
    linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 50%, #F48FB1 100%);
  padding: 3rem 2.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.45;
  pointer-events: none;
}
.hero-blob-1 {
  width: 220px; height: 220px;
  background: #E91E63;
  top: -50px; right: -50px;
  animation: float 12s ease-in-out infinite;
}
.hero-blob-2 {
  width: 160px; height: 160px;
  background: #AD1457;
  bottom: -30px; left: -30px;
  opacity: 0.3;
  animation: float 14s ease-in-out infinite reverse;
}
@keyframes float {
  0%,100% { transform: translate(0, 0); }
  50%     { transform: translate(20px, -15px); }
}

.hero-top { position: relative; z-index: 1; }

.hero-logo-wrap {
  display: inline-block;
  background: #fff;
  padding: 8px 14px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(173, 20, 87, 0.15);
  margin-bottom: 1.75rem;
}
.hero-logo-wrap img {
  display: block;
  max-width: 180px;
  height: auto;
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--pink-darker);
  margin: 0 0 0.6rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero-tagline {
  color: var(--rose-text);
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.hero-features {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 2rem 0;
}
.hero-feature {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  color: var(--rose-text);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform 0.2s;
}
.hero-feature:hover { transform: translateX(4px); }
.hero-feature i {
  color: var(--pink);
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.hero-bottom {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--pink-darker);
  opacity: 0.55;
  font-size: 12px;
}

/* ════════════════════════ Form panel ════════════════════════ */
.form-panel {
  padding: 3rem 2.75rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #fff;
  overflow-y: auto;
  max-height: 90vh;
}

.form-inner {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.form-header { margin-bottom: 1.5rem; }
.form-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}
.text-muted-soft { color: var(--gray-500); font-size: 13.5px; margin: 0; }

.error-banner {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

/* ════════════════════════ Step indicator ════════════════════════ */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.6rem;
  padding: 0 0.5rem;
}
.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  position: relative;
}
.step-dot.active {
  background: linear-gradient(135deg, var(--pink), var(--pink-darker));
  color: #fff;
  box-shadow: 0 6px 16px rgba(233, 30, 99, 0.4);
  transform: scale(1.1);
}
.step-dot.completed {
  background: var(--pink-darker);
  color: #fff;
}
.step-dot.completed::after {
  content: '✓';
  position: absolute;
  font-size: 13px;
}
.step-dot.completed span { display: none; }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--gray-100);
  border-radius: 1px;
  transition: background 0.35s;
}
.step-line.active {
  background: linear-gradient(90deg, var(--pink-darker), var(--pink));
}

.step-label-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-size: 12px;
  text-align: center;
  margin-bottom: 1.75rem;
  color: var(--gray-400);
}
.step-label-item {
  transition: color 0.35s, font-weight 0.35s;
}
.step-label-item.active {
  color: var(--pink-darker);
  font-weight: 600;
}

/* ════════════════════════ Form steps ════════════════════════ */
.form-step {
  display: none;
}
.form-step.active {
  display: block;
  animation: fadeSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═════════════════ Phase 5.22e — school search ═════════════════ */
.school-search-wrap {
  position: relative;
  margin: 0 0 0.85rem;
}
.school-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400, #9aa1ab);
  font-size: 16px;
  pointer-events: none;
}
.school-search-input {
  width: 100%;
  padding: 10px 70px 10px 38px;
  border: 1.5px solid var(--gray-100, #e8e9ef);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.school-search-input:focus {
  outline: none;
  border-color: var(--pink, #E91E63);
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.12);
}
.school-search-input::placeholder {
  color: var(--gray-400, #b0b3bd);
}
.school-search-count {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--gray-400, #8b8e96);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* ════════════════════════ Picker list ════════════════════════ */
.picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 360px;
  overflow-y: auto;
  padding: 4px;
  margin: 0 -4px;
}
.picker-list::-webkit-scrollbar { width: 6px; }
.picker-list::-webkit-scrollbar-track { background: transparent; }
.picker-list::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 3px; }
.picker-list::-webkit-scrollbar-thumb:hover { background: var(--pink); }

.picker-item {
  background: #fff;
  border: 1.5px solid var(--gray-100);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
}
.picker-item:hover {
  border-color: var(--pink);
  background: var(--pink-bg);
  transform: translateX(4px);
  box-shadow: 0 6px 16px rgba(233, 30, 99, 0.12);
}
.picker-item:active {
  transform: translateX(4px) scale(0.985);
}

.item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--pink-light);
  color: var(--pink-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: all 0.2s;
}
.picker-item:hover .item-icon {
  background: var(--pink);
  color: #fff;
  transform: scale(1.05);
}

/* Role icons (user picker) */
.item-icon.icon-gray   { background: #F3F4F6; color: #6B7280; }
.item-icon.icon-blue   { background: #DBEAFE; color: #1D4ED8; }
.item-icon.icon-pink   { background: var(--pink-light); color: var(--pink-darker); }
.item-icon.icon-purple { background: #EDE9FE; color: #6D28D9; }

.item-body { flex: 1; min-width: 0; }
.item-code {
  font-family: 'SF Mono', monospace;
  font-size: 11.5px;
  color: var(--pink);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 1px;
}
.item-name {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 14.5px;
  line-height: 1.3;
}
.item-meta {
  font-size: 12.5px;
  color: var(--gray-500);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.item-meta i { font-size: 13px; opacity: 0.75; }
.dot-sep { opacity: 0.5; }
.user-id-mono {
  font-family: 'SF Mono', monospace;
  font-weight: 600;
  color: var(--pink-darker);
}

.item-arrow {
  color: var(--pink);
  font-size: 16px;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.picker-item:hover .item-arrow {
  transform: translateX(4px);
}

/* ════════════════════════ Separator ════════════════════════ */
.separator {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--gray-400);
  font-size: 12px;
}
.separator::before, .separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ════════════════════════ Super-admin button ════════════════════════ */
.super-admin-btn {
  width: 100%;
  background: linear-gradient(135deg, #fff, var(--pink-bg));
  border: 1.5px dashed var(--pink);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  text-align: left;
  font-size: inherit;
}
.super-admin-btn:hover {
  border-style: solid;
  background: linear-gradient(135deg, var(--pink-bg), var(--pink-light));
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(233, 30, 99, 0.2);
}
.super-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pink), var(--pink-darker));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
}
.super-body { flex: 1; }
.super-title {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 14.5px;
}
.super-desc {
  color: var(--gray-500);
  font-size: 12.5px;
  margin-top: 2px;
}

/* ════════════════════════ Step topbar (back + tag) ════════════════════════ */
.step-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.step-back-btn {
  background: none;
  border: 1.5px solid var(--gray-100);
  color: var(--gray-500);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
}
.step-back-btn:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: var(--pink-bg);
}
.school-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--pink-light);
  color: var(--pink-darker);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ════════════════════════ User card (step 3) ════════════════════════ */
.user-card {
  background: linear-gradient(135deg, var(--pink-bg), var(--pink-light));
  border: 1px solid var(--pink-light);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--pink-darker));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(233, 30, 99, 0.35);
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 15px;
  margin-bottom: 2px;
}
.user-meta {
  font-size: 12.5px;
  color: var(--rose-text);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.user-id {
  font-family: 'SF Mono', monospace;
  font-weight: 600;
  color: var(--pink-darker);
}

/* ════════════════════════ Password input ════════════════════════ */
.field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}
.password-group {
  position: relative;
  margin-bottom: 1.25rem;
}
.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 16px;
  pointer-events: none;
}
.password-input {
  width: 100%;
  padding: 0.95rem 3rem 0.95rem 2.65rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  transition: all 0.2s;
  outline: none;
}
.password-input::placeholder { color: var(--gray-400); }
.password-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.12);
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.5rem;
  font-size: 16px;
  transition: color 0.2s;
  border-radius: 6px;
}
.password-toggle:hover { color: var(--pink); background: var(--pink-bg); }

/* ════════════════════════ Submit button ════════════════════════ */
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--pink), var(--pink-darker));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.95rem;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(173, 20, 87, 0.35);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit i { transition: transform 0.2s; }
.btn-submit:hover i { transform: translateX(3px); }

.forgot-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  color: var(--gray-500);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}
.forgot-link:hover { color: var(--pink); }

/* ════════════════════════ Hint banner ════════════════════════ */
.hint-banner {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: #FFFBEB;
  border: 1px solid #FEF3C7;
  border-radius: 10px;
  color: #92400E;
  font-size: 12.5px;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.hint-banner i { color: #F59E0B; flex-shrink: 0; margin-top: 1px; font-size: 14px; }

/* ════════════════════════ Locale switcher (login) ════════════════════════ */
.login-locale-switch {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--gray-200, #E5E7EB);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--gray-500, #6B7280);
}
.login-locale-label { display: inline-flex; align-items: center; gap: 0.4rem; }
.login-locale-btn {
  border: 1px solid var(--gray-200, #E5E7EB);
  background: #fff;
  color: var(--gray-600, #4B5563);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.login-locale-btn:hover { border-color: var(--pink, #E91E63); color: var(--pink, #E91E63); }
.login-locale-btn.is-active {
  background: var(--pink, #E91E63);
  border-color: var(--pink, #E91E63);
  color: #fff;
  cursor: default;
}

/* ════════════════════════ Empty state ════════════════════════ */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--gray-500);
}
.empty-state i {
  font-size: 2.5rem;
  color: var(--gray-200);
  display: block;
  margin-bottom: 0.5rem;
}
.empty-state p { margin: 0; font-size: 13.5px; line-height: 1.5; }
