/* ==========================================
   1. RESET & BODY LAYOUT
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: #f4f6f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Dark Theme Support */
body.dark-theme {
  background-color: #0b0f17;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================
   2. HEADER & NAVIGATION (FIXED AT TOP)
   ========================================== */
.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background-color: #000033;
  color: #ffffff;
  padding: 0 24px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  font-size: 0.92rem;
}

.brand svg {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.16);
}

.icon-btn .moon {
  display: none;
}

:root[data-theme="dark"] .icon-btn .sun {
  display: none;
}

:root[data-theme="dark"] .icon-btn .moon {
  display: block;
}

/* Header Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-solid {
  background-color: #ffffff;
  color: #000033;
}

.btn-solid:hover {
  filter: brightness(0.92);
}

/* ==========================================
   3. MAIN CONTENT CONTAINER (CENTERED CARD)
   ========================================== */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  width: 100%;
}

.auth-wrapper {
  width: 100%;
  max-width: 420px;
  display: flex;
  justify-content: center;
}

.auth-card {
  background-color: #ffffff;
  width: 100%;
  border-radius: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

body.dark-theme .auth-card {
  background-color: #161f2e;
}

/* ==========================================
   4. CARD HEADER & TABS
   ========================================== */
.auth-header {
  background-color: #000033;
  padding: 32px 24px 20px 24px;
  color: #ffffff;
  position: relative;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.dark-theme .auth-header {
  background-color: #0f172a;
}

.back-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
}

/* Tab Controls */
.auth-tabs {
  display: flex;
  width: 100%;
  justify-content: space-around;
  position: relative;
}

.tab-item {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  padding-bottom: 6px;
  position: relative;
  transition: color 0.2s ease;
}

.tab-item.active {
  color: #ffffff;
  font-weight: 700;
}

.tab-item.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
}

/* ==========================================
   5. BODY FORM & INPUT CONTROLS
   ========================================== */
.auth-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.auth-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  margin-bottom: 24px;
}

body.dark-theme .auth-title {
  color: #f8fafc;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 18px;
  color: #000033;
  font-size: 14px;
}

body.dark-theme .input-icon {
  color: #94a3b8;
}

.toggle-pwd-icon {
  position: absolute;
  right: 18px;
  color: #000033;
  font-size: 14px;
  cursor: pointer;
}

body.dark-theme .toggle-pwd-icon {
  color: #94a3b8;
}

.form-control {
  width: 100%;
  padding: 13px 46px;
  border-radius: 25px;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  font-size: 13px;
  color: #1e293b;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

body.dark-theme .form-control {
  background-color: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

.form-control:focus {
  border-color: #000033;
}

body.dark-theme .form-control:focus {
  border-color: #3b82f6;
}

.form-control::placeholder {
  color: #94a3b8;
}

/* Form Options Row */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  padding: 0 4px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  cursor: pointer;
}

body.dark-theme .remember-me {
  color: #94a3b8;
}

.forgot-link {
  color: #ef4444;
  font-weight: 600;
}

/* Primary Submit Button */
.auth-submit-btn {
  background-color: #000033;
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 51, 0.2);
  transition: opacity 0.2s ease;
}

body.dark-theme .auth-submit-btn {
  background-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.auth-submit-btn:hover {
  opacity: 0.92;
}

/* Biometric Section */
.biometric-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6px;
}

.biometric-btn {
  background: rgba(0, 0, 51, 0.05);
  border: 1.5px dashed #000033;
  color: #000033;
  border-radius: 20px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

body.dark-theme .biometric-btn {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: #3b82f6;
}

.biometric-btn:hover {
  background: rgba(0, 0, 51, 0.1);
}

.biometric-btn i {
  font-size: 18px;
}

/* ==========================================
   6. SOCIAL LOGINS & FOOTER
   ========================================== */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

body.dark-theme .divider::before,
body.dark-theme .divider::after {
  border-bottom-color: #233148;
}

.divider span {
  padding: 0 10px;
  font-size: 11px;
  color: #64748b;
}

body.dark-theme .divider span {
  color: #94a3b8;
}

.social-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.google-btn {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

body.dark-theme .google-btn {
  background-color: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

.facebook-btn {
  background-color: #000033;
  border: 1px solid #000033;
  color: #ffffff;
}

body.dark-theme .facebook-btn {
  background-color: #1e293b;
  border-color: #334155;
}

.google-btn i { color: #ea4335; }
.facebook-btn i { color: #ffffff; }

.auth-footer-curve {
  height: 28px;
  background-color: #000033;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  width: 100%;
}

body.dark-theme .auth-footer-curve {
  background-color: #0f172a;
}

/* ==========================================
   7. RESPONSIVE / MOBILE MEDIA QUERIES
   ========================================== */
@media (max-width: 768px) {
  /* Hide navbar links & action buttons on mobile screens */
  .nav-links,
  .nav-action-btn {
    display: none !important;
  }

  .site-head {
    padding: 0 16px;
  }

  .main-content {
    padding: 16px;
  }
}