/* ============================================
   ExamConnect — Auth Pages (Login/Register/Forgot)
   Brand: #327b74 Teal | #0F4C81 Navy | #F59E0B Amber
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* Page background */
.ec-auth-page {
  background: linear-gradient(135deg, #f0faf9 0%, #fafbfc 100%);
  min-height: 70vh;
  padding: 40px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
}
.ec-auth-page * { font-family: 'Poppins', sans-serif; box-sizing: border-box; }

/* Hide gray default title bar */
.container-fluid[style*="dee2e6"]:has(~ .ec-auth-page),
.container-fluid[style*="dee2e6"] { }

/* === SPLIT CARD === */
.ec-auth-card {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  max-width: 900px;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 76, 129, 0.15);
}

/* === LEFT — BRAND PANEL === */
.ec-auth-left {
  background: linear-gradient(135deg, #0F4C81 0%, #327b74 100%);
  padding: 40px 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ec-auth-left::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 220px; height: 220px;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 50%;
}
.ec-auth-left::after {
  content: '';
  position: absolute; bottom: -50px; left: -40px;
  width: 160px; height: 160px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}
.ec-auth-left-inner { position: relative; z-index: 1; }

.ec-auth-logo {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 28px;
  color: #fff;
}
.ec-auth-logo span { color: #FAC775; }

.ec-auth-left-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.3;
  color: #fff;
}
.ec-auth-left-title b {
  background: linear-gradient(135deg, #F59E0B, #FAC775);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ec-auth-left-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 24px;
  line-height: 1.6;
}

.ec-auth-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ec-auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.95);
}
.ec-auth-feature-ic {
  width: 34px; height: 34px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.ec-auth-feature b { color: #FAC775; }

.ec-auth-trust {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  gap: 20px;
}
.ec-auth-trust-item { font-size: 11px; color: rgba(255,255,255,0.8); }
.ec-auth-trust-item b {
  display: block;
  font-size: 18px;
  color: #FAC775;
  font-weight: 800;
}

/* === RIGHT — FORM PANEL === */
.ec-auth-right {
  padding: 38px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ec-auth-right-head { margin-bottom: 20px; }
.ec-auth-right-title {
  font-size: 22px;
  font-weight: 800;
  color: #0F4C81;
  margin: 0 0 4px;
}
.ec-auth-right-sub {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

/* === TABS OVERRIDE (Bootstrap nav-tabs) === */
.ec-auth-right .card,
.ec-auth-right .card-primary,
.ec-auth-right .card-tabs {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
.ec-auth-right .card-header {
  background: #f1f5f9 !important;
  border: none !important;
  padding: 4px !important;
  border-radius: 10px !important;
  margin-bottom: 18px;
}
.ec-auth-right .nav-tabs {
  border: none !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 4px;
  width: 100%;
}
.ec-auth-right .nav-tabs .nav-item {
  width: 50% !important;
  flex: 1 1 50% !important;
  list-style: none !important;
  margin: 0 !important;
}
.ec-auth-right .nav-tabs .nav-link {
  border: none !important;
  border-radius: 7px !important;
  text-align: center;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  padding: 9px !important;
  background: transparent !important;
  margin: 0 !important;
  display: block !important;
  width: 100% !important;
}

.ec-auth-right .nav-tabs .nav-link.active {
  background: #fff !important;
  color: #0F4C81 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.ec-auth-right .card-body { padding: 0 !important; }

/* === INPUT GROUPS OVERRIDE === */
.ec-auth-right .input-group {
  margin-bottom: 16px !important;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  overflow: hidden;
  transition: all 0.2s;
}
.ec-auth-right .input-group:focus-within {
  border-color: #327b74;
  background: #fff;
}
.ec-auth-right .input-group .form-control {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px !important;
  color: #475569 !important;
  padding: 11px 14px !important;
  height: auto !important;
}
.ec-auth-right .input-group .form-control:focus {
  border: none !important;
  box-shadow: none !important;
}
.ec-auth-right .input-group-append .input-group-text {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
}
.ec-auth-right .input-group-prepend .form-control { background: #f8fafc !important; }

/* Show password checkbox */
.ec-auth-right .checkbox {
  margin-bottom: 16px;
}
.ec-auth-right .checkbox label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* === BUTTON OVERRIDE === */
.ec-auth-right .btn-primary {
  background: linear-gradient(135deg, #0F4C81, #327b74) !important;
  border: none !important;
  border-radius: 9px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 12px 20px !important;
  box-shadow: 0 4px 14px rgba(50, 123, 116, 0.3) !important;
  transition: all 0.2s !important;
  width: 100%;
}
.ec-auth-right .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(50, 123, 116, 0.4) !important;
}
/* Button column full width */
.ec-auth-right .row .col-4,
.ec-auth-right .row .col {
  flex: 0 0 100% !important;
  max-width: 100% !important;
}

/* === FOOTER LINKS === */
.ec-auth-right p {
  font-size: 12px !important;
  color: #64748b !important;
  margin: 10px 3px 0 !important;
}
.ec-auth-right p a {
  color: #327b74 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
.ec-auth-right p a:hover { text-decoration: underline !important; }

/* Remove old card styling from login wrapper */
.ec-auth-right > b > .card,
.ec-auth-right .card[style] {
  padding: 0 !important;
  box-shadow: none !important;
  border: none !important;
}

/* Captcha spacing */
.ec-auth-right .g-recaptcha { margin: 10px 0; }

/* === MOBILE RESPONSIVE === */
@media (max-width: 767px) {
  .ec-auth-card {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .ec-auth-left {
    padding: 28px 24px;
  }
  .ec-auth-left-title { font-size: 20px; }
  .ec-auth-features { gap: 10px; }
  .ec-auth-right { padding: 28px 22px; }
}

/* ============================================
   REGISTER PAGE — Wide card + clean field grid
   ============================================ */

.ec-auth-card-wide {
  max-width: 1000px !important;
}

/* Register form - flex grid, 2 columns */
.ec-reg-form {
  display: flex !important;
  flex-wrap: wrap !important;
  margin: 0 !important;
  gap: 0 !important;
}

/* Each field block - force 50% width, reset Bootstrap */
.ec-reg-form > .row.col-md-6 {
  flex: 0 0 50% !important;
  max-width: 50% !important;
  width: 50% !important;
  padding: 0 8px !important;
  margin: 0 0 12px 0 !important;
  display: block !important;
}
.ec-reg-form > .row.col-md-12 {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 8px !important;
  margin: 0 0 12px 0 !important;
  display: block !important;
}

/* Labels - above input, full width */
.ec-reg-form .col-form-label,
.ec-reg-form label.col-lg-3,
.ec-reg-form label.col-sm-1 {
  display: block !important;
  text-align: left !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #475569 !important;
  padding: 0 0 5px 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  flex: none !important;
}

/* Input group - full width, reset Bootstrap col */
.ec-reg-form .input-group,
.ec-reg-form .form-group,
.ec-reg-form .col-lg-9,
.ec-reg-form .col-sm-11 {
  display: flex !important;
  max-width: 100% !important;
  width: 100% !important;
  flex: 0 0 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ec-reg-form .input-group {
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  overflow: hidden;
  flex-wrap: nowrap !important;
}
.ec-reg-form .input-group:focus-within {
  border-color: #327b74;
  background: #fff;
}
.ec-reg-form .input-group .form-control {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px !important;
  color: #475569 !important;
  padding: 10px 12px !important;
  height: auto !important;
}
.ec-reg-form .input-group-append .input-group-text,
.ec-reg-form .input-group-prepend .input-group-text {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
}

/* Select dropdowns */
.ec-reg-form .form-group select.form-control,
.ec-reg-form .input-group select.form-control {
  border: none !important;
  background: transparent !important;
  font-size: 13px !important;
  padding: 10px 12px !important;
  height: auto !important;
  box-shadow: none !important;
}
.ec-reg-form .form-group {
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 9px !important;
  background: #f8fafc !important;
  overflow: hidden;
}

/* Country code prepend - small width */
.ec-reg-form .input-group-prepend {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: 90px !important;
  border-right: 1px solid #e2e8f0;
}
.ec-reg-form .input-group-prepend .select2-container { width: 80px !important; }

/* File upload field */
.ec-reg-form .custom-file {
  display: block !important;
  border: 1.5px dashed #cbd5e1 !important;
  border-radius: 9px !important;
  background: #f8fafc !important;
  padding: 12px !important;
  position: relative;
}
.ec-reg-form .custom-file-input {
  cursor: pointer;
}
.ec-reg-form .custom-file-label {
  border: none !important;
  background: transparent !important;
  font-size: 12px !important;
  color: #64748b !important;
  position: relative !important;
  padding: 4px !important;
  height: auto !important;
  display: block;
}
.ec-reg-form .custom-file-label::after {
  background: #327b74 !important;
  color: #fff !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  height: auto !important;
  padding: 5px 12px !important;
}
.ec-reg-form .custom-file small {
  display: block;
  font-size: 9px !important;
  color: #94a3b8 !important;
  margin-top: 6px;
}

/* Textarea */
.ec-reg-form textarea.form-control {
  min-height: 60px;
  border: none !important;
  background: transparent !important;
}

/* Footer row */
.ec-reg-form .ec-reg-footer {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center !important;
  justify-content: space-between;
  margin-top: 8px !important;
  padding: 14px 8px 0 !important;
  border-top: 1px solid #f1f5f9 !important;
}
.ec-reg-form .ec-reg-footer > div {
  flex: none !important;
  max-width: none !important;
  width: auto !important;
  padding: 0 !important;
}
.ec-reg-form .ec-reg-footer a {
  color: #327b74 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  font-size: 12px !important;
}
.ec-reg-form .ec-reg-footer .btn-primary {
  width: auto !important;
  padding: 10px 30px !important;
}

/* Captcha block full width */
.ec-reg-form .g-recaptcha,
.ec-reg-form > div[class*="mt-1"] {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  padding: 0 8px !important;
}

@media (max-width: 767px) {
  .ec-reg-form > .row.col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}
/* Forgot password footer links */
.ec-auth-foot-line {
  font-size: 12px !important;
  color: #64748b !important;
  margin: 10px 0 0 !important;
  text-align: center;
}
.ec-auth-foot-line a {
  color: #327b74 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
.ec-auth-foot-line a:hover { text-decoration: underline !important; }
/* ── Mobile login page footer fix ── */
@media (max-width: 768px) {
    .ec-auth-wrapper {
        min-height: auto !important;
        height: auto !important;
    }
    .ec-auth-container {
        flex-direction: column !important;
        min-height: auto !important;
    }
    .ec-auth-left {
        min-height: 200px !important;
        border-radius: 12px 12px 0 0 !important;
    }
    .ec-auth-right {
        border-radius: 0 0 12px 12px !important;
    }
    #footer.ec-footer {
        position: relative !important;
        z-index: 1 !important;
    }
}
