/* ============================================================
   ITET Learn — auth.css
   Login wall + header sign-in button + user menu
   ============================================================ */

/* ========================
   LOGIN WALL (full page)
   ======================== */
.auth-page {
  min-height: calc(100vh - 60px);
  background: linear-gradient(135deg, #f8fafc 0%, #fff7ed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
html.dark .auth-page {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.auth-card {
  background: #fff;
  border-radius: 18px;
  padding: 38px 36px 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.10);
  border: 1px solid #e2e8f0;
}
html.dark .auth-card { background: #1e293b; border-color: #334155; }

.auth-card-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #F59C0D, #ea6c00);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 18px;
  box-shadow: 0 6px 18px rgba(245, 156, 13, 0.30);
}

.auth-card h1 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #162447;
  margin: 0 0 8px;
  text-align: center;
}
html.dark .auth-card h1 { color: #f1f5f9; }

.auth-lead {
  text-align: center;
  font-size: 0.92rem;
  color: #64748b;
  margin: 0 0 26px;
  line-height: 1.55;
}
html.dark .auth-lead { color: #94a3b8; }

.auth-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 22px;
}
html.dark .auth-tabs { background: #0f172a; }

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 9px 12px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  border-radius: 7px;
  transition: all 0.18s;
  font-family: inherit;
}
.auth-tab.active {
  background: #fff;
  color: #162447;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
html.dark .auth-tab { color: #64748b; }
html.dark .auth-tab.active { background: #1e293b; color: #f1f5f9; }

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

.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.2px;
}
html.dark .auth-field label { color: #cbd5e1; }
.auth-field label .optional {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.72rem;
}

.auth-field input {
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 0.92rem;
  font-family: inherit;
  background: #fff;
  color: #1e293b;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.auth-field input:focus {
  border-color: #F59C0D;
  box-shadow: 0 0 0 3px rgba(245, 156, 13, 0.12);
}
html.dark .auth-field input {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}

.auth-error {
  color: #dc2626;
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 1.2em;
  text-align: center;
}

.auth-submit {
  background: linear-gradient(135deg, #F59C0D, #ea6c00);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 6px;
  transition: transform 0.12s, box-shadow 0.15s;
  font-family: inherit;
}
.auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 156, 13, 0.35);
}
.auth-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.auth-footer {
  font-size: 0.78rem;
  color: #64748b;
  text-align: center;
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}
html.dark .auth-footer { color: #94a3b8; border-top-color: #334155; }

.auth-back {
  text-align: center;
  margin-top: 14px;
}
.auth-back a {
  font-size: 0.82rem;
  color: #F59C0D;
  font-weight: 600;
  text-decoration: none;
}
.auth-back a:hover { text-decoration: underline; }

/* ========================
   HEADER AUTH STATE
   ======================== */
.hdr-auth-btn {
  background: none;
  border: 1.5px solid #e2e8f0;
  color: #64748b;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.hdr-auth-btn:hover { border-color: #F59C0D; color: #F59C0D; background: #fff7ed; }
html.dark .hdr-auth-btn { background: transparent; border-color: #334155; color: #94a3b8; }
html.dark .hdr-auth-btn:hover { background: #1e293b; color: #F59C0D; border-color: #F59C0D; }

.hdr-user-menu {
  position: relative;
  display: inline-block;
}
.hdr-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59C0D, #ea6c00);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(245, 156, 13, 0.30);
  transition: transform 0.12s;
}
.hdr-avatar:hover { transform: scale(1.06); }

.hdr-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  min-width: 220px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
  padding: 8px;
  display: none;
  z-index: 200;
}
.hdr-user-dropdown.visible { display: block; }
html.dark .hdr-user-dropdown { background: #1e293b; border-color: #334155; }

.hdr-user-info {
  padding: 10px 12px 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 6px;
}
html.dark .hdr-user-info { border-bottom-color: #334155; }
.hdr-user-name { font-size: 0.88rem; font-weight: 700; color: #162447; margin: 0; }
html.dark .hdr-user-name { color: #f1f5f9; }
.hdr-user-email { font-size: 0.76rem; color: #64748b; margin: 2px 0 0; }
html.dark .hdr-user-email { color: #94a3b8; }

.hdr-user-action {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 9px 12px;
  font-size: 0.84rem;
  color: #475569;
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.hdr-user-action:hover { background: #f8fafc; color: #F59C0D; }
html.dark .hdr-user-action { color: #cbd5e1; }
html.dark .hdr-user-action:hover { background: #0f172a; color: #F59C0D; }
