/* BCTECH - High-Fidelity Login Screen */
/* Strictly NO emojis, clean typography with full Vietnamese support, no duplicate headers */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700&display=swap');

:root {
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-btn: #2563eb;
  --primary-btn-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --bg-page: #f0f7ff;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --border-card: #e2e8f0;
  --border-input: #cbd5e1;
  --radius-card: 16px;
  --radius-input: 8px;
  --font-sans: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.login-page-body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  background-image: url('/static/login-bg.webp');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

.login-wrapper {
  width: 100%;
  max-width: 1200px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
}

/* Left Column: School Identity & System Purpose (Centered & Balanced) */
.login-showcase {
  flex: 1;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.showcase-brand-header {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.showcase-logo-wrap {
  width: 82px;
  height: 82px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.showcase-school-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
  text-align: center;
}

.showcase-system-title {
  font-size: 28px;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.35;
  letter-spacing: -0.3px;
  margin-bottom: 14px;
  text-align: center;
}

.showcase-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #64748b;
  max-width: 440px;
  margin: 0 auto 28px;
  text-align: center;
}

/* 3 Feature Badges */
.showcase-features-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  margin: 0 auto;
}

.showcase-feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 88px;
}

.feature-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #e0edff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.showcase-feature-item:hover .feature-icon-circle {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.14);
}

.feature-text {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  line-height: 1.35;
  text-align: center;
}

/* Right Column: Floating Login Card */
.login-card-panel {
  width: 440px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.login-card {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 32px 30px 26px;
}

/* Card Header: Clean & Direct */
.login-card-header {
  margin-bottom: 22px;
  text-align: left;
}

.card-login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.card-login-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Error Alert */
.login-alert {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
  border-radius: var(--radius-input);
  font-size: 12.5px;
  line-height: 1.4;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* Form Fields */
.login-field {
  margin-bottom: 16px;
}

.login-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-left {
  position: absolute;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  pointer-events: none;
}

.login-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-input);
  outline: none;
  background-color: #ffffff;
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input.has-icon-left {
  padding-left: 36px;
}

.login-input:focus {
  border-color: var(--primary-btn);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-input:focus + .input-icon-left,
.login-input-wrap:focus-within .input-icon-left {
  color: var(--primary-btn);
}

.login-input-pwd {
  padding-right: 38px;
}

.btn-pwd-toggle {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-pwd-toggle:hover {
  color: var(--text-main);
}

.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 12.5px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.remember-label input[type="checkbox"] {
  accent-color: var(--primary-btn);
  cursor: pointer;
}

.btn-submit-login {
  width: 100%;
  height: 44px;
  background-color: var(--primary-btn);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-input);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-submit-login:hover {
  background-color: var(--primary-btn-hover);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.btn-submit-login:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  box-shadow: none;
}

.spinner-svg {
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 1-Click Demo Accounts Selector */
.demo-accounts-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-card);
}

.demo-accounts-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-pills-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-pill-btn {
  width: 100%;
  padding: 6px 10px;
  background-color: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: #334155;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.12s ease;
}

.demo-pill-btn:hover {
  background-color: var(--primary-light);
  border-color: #bfdbfe;
  color: var(--primary);
}

.demo-role-tag {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background: #e2e8f0;
  color: #475569;
  letter-spacing: 0.3px;
}

.demo-pill-btn:hover .demo-role-tag {
  background: #dbeafe;
  color: #1e40af;
}

/* Responsive */
@media (max-width: 992px) {
  .login-wrapper {
    flex-direction: column;
    justify-content: center;
    padding: 32px 16px;
    gap: 32px;
  }

  .login-showcase {
    max-width: 480px;
    text-align: center;
    align-items: center;
  }

  .showcase-logo-wrap {
    margin: 0 auto 16px;
  }

  .showcase-system-title {
    font-size: 26px;
  }

  .showcase-motto-wrap {
    justify-content: center;
  }

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

@media (max-width: 520px) {
  .login-showcase {
    display: none;
  }

  .login-card {
    padding: 24px 18px;
  }
}
