/* ════════════════════════════════════════════════════════
   AUTH PAGE STYLES — Login / Signup
   ════════════════════════════════════════════════════════ */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  animation: fadeIn .4s ease;
}

.auth-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
  margin: 0 0 8px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-sub {
  text-align: center;
  color: var(--text-mid);
  font-size: 14px;
  margin: 0 0 24px;
  line-height: 1.5;
}

.auth-tabbar {
  display: flex;
  gap: 4px;
  background: var(--surface-3);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}
.auth-tab:hover { background: rgba(99,102,241,0.06); }
.auth-tab.active {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: 0 3px 10px rgba(99,102,241,0.30);
}

/* Tab Admin — phân biệt rõ ràng với tab Student */
.auth-tab-admin {
  position: relative;
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(239,68,68,0.06));
  color: #b45309;
  font-weight: 800;
}
.auth-tab-admin::before {
  content: '👑';
  margin-right: 4px;
  font-size: 12px;
}
.auth-tab-admin:hover { background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(239,68,68,0.12)); }
:root[data-theme="dark"] .auth-tab-admin {
  background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(239,68,68,0.14));
  color: #fbbf24;
}
:root[data-theme="dark"] .auth-tab-admin:hover { background: linear-gradient(135deg, rgba(245,158,11,0.28), rgba(239,68,68,0.22)); }
.auth-tab-admin.active {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239,68,68,0.38);
}

/* Badge "Quản trị viên" trong panel admin */
.auth-admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin: 0 auto 14px;
  box-shadow: 0 3px 10px rgba(239,68,68,0.30);
}
.auth-panel[data-panel="admin"] .auth-admin-badge {
  display: flex;
  width: fit-content;
}
[data-panel="admin"].auth-panel { padding-top: 4px; }
[data-panel="admin"].auth-panel .auth-panel-desc {
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 18px;
}

.auth-panel { display: none; }
.auth-panel.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.auth-panel-desc {
  font-size: 13px;
  color: var(--text-soft);
  text-align: center;
  margin: 0 0 18px;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-field input {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: all .2s;
}
.auth-field input::placeholder { color: var(--text-soft); }
.auth-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.10);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: #fff;
  color: #1a1a3e;
  border: 2px solid #dadce0;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-google:hover {
  background: #f8f9fa;
  border-color: #c0c4cd;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}
:root[data-theme="dark"] .btn-google {
  background: #f5f5fa;
  color: #1a1a3e;
}
:root[data-theme="dark"] .btn-google:hover { background: #fff; }

.btn-primary {
  width: 100%;
  padding: 13px 20px;
  background: var(--grad-btn);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(99,102,241,0.32);
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99,102,241,0.42); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-link {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px;
  font-family: inherit;
}
.btn-link:hover { text-decoration: underline; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-foot {
  text-align: center;
  font-size: 13px;
  color: var(--text-mid);
  margin: 16px 0 0;
}
.auth-foot a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.auth-foot a:hover { text-decoration: underline; }

.auth-status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  text-align: center;
  font-weight: 600;
  display: none;
  animation: fadeIn .2s ease;
}
.auth-status.show { display: block; }
.auth-status.info  { background: rgba(99,102,241,0.10); color: var(--primary); }
.auth-status.success { background: rgba(16,185,129,0.12); color: #10b981; }
.auth-status.error { background: rgba(239,68,68,0.12); color: #ef4444; }
:root[data-theme="dark"] .auth-status.success { color: #34d399; }
:root[data-theme="dark"] .auth-status.error { color: #f87171; }

.auth-terms {
  text-align: center;
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 18px;
  line-height: 1.5;
}
.auth-terms a { color: var(--primary); text-decoration: none; }
.auth-terms a:hover { text-decoration: underline; }

#otpStep2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

/* Mobile */
@media (max-width: 480px) {
  .auth-card { padding: 24px 18px; }
  .auth-title { font-size: 24px; }
  .auth-tab { font-size: 12px; padding: 8px 4px; }
}
