﻿/* =====================================================
   LOGIN / REGISTER â€“ FIX LOGO LEFT & BUTTONS RIGHT
   ===================================================== */

@media only screen and (min-width: 1200px) {

  /* ===== HEADER BASE ===== */
   /* REMOVE STICKY HEADER FOR LOGIN / REGISTER */
  body:not(.dashboard) .main-header {
    position: absolute !important;  /* KEY FIX */
    top: 0;
    left: 0;
    right: 0;
  }

  body:not(.dashboard) .main-header .container-fluid {
    padding: 0;
  }

  body:not(.dashboard) .main-header .main-box {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    height: 80px;
  }

  /* ===== LEFT: LOGO ON BLUE PANEL ===== */
  body:not(.dashboard) .main-header .logo-box {
    width: 50%;
    height: 80px;
    display: flex;
    align-items: center;
    padding-left: 40px;
    background: transparent;
    z-index: 2;
  }

  body:not(.dashboard) .main-header .logo img {
    max-height: 46px;
    display: block;
  }

  /* ===== RIGHT: LOGIN / REGISTER BUTTONS ===== */
  body:not(.dashboard) .main-header .outer-box {
    width: 50%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 40px;
    z-index: 2;
  }

  body:not(.dashboard) .mode-btn {
    font-size: 14px;
    padding: 8px 22px;
    border-radius: 6px;
  }

  /* ===== ENSURE LOGIN SECTION STARTS BELOW HEADER ===== */
  body:not(.dashboard) .login-section {
    padding-top: 80px;
  }
}
/* =====================================================
   LOGIN / REGISTER â€“ INCREASE LOGO SIZE (LEFT PANEL)
   ===================================================== */

@media only screen and (min-width: 1200px) {

  /* Bigger logo on auth pages */
  body:not(.dashboard) .main-header .logo img {
    max-height: 72px;   /* ðŸ”¥ increase size */
    width: auto;
    height: auto;
  }

  /* Ensure logo container centers it nicely */
  body:not(.dashboard) .main-header .logo-box {
    height: 80px;
    display: flex;
    align-items: center;
  }
}

/* =====================================================
   LOGIN / REGISTER - FORM SIZE TUNING
   ===================================================== */

.mode-btn.active {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}

small.text-danger {
  display: block;
  font-size: 13px;
  margin-top: 2px;
}

/* Hide Edge & Chrome default password reveal eye */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none !important;
}

input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-clear-button {
  display: none !important;
}

/* Common style for all password toggle icons */
.toggle-password {
  position: absolute;
  right: 14px;
  top: 46px;
  cursor: pointer;
  font-size: 14px;
  color: #555;
}

.login-section .login-form {
  font-size: 95%;
  margin-top: -12px;
}

.login-section .form-inner h4 {
  font-size: 28px;
}

.login-section #mode-title {
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.3;
}

.login-section #role-selection {
  margin-top: 0;
  margin-bottom: 10px;
}

.login-section #role-selection .btn-box {
  margin-top: 0;
  margin-bottom: 0;
}

.login-section #role-selection .btn-box > [class*="col-"] {
  padding-left: 6px;
  padding-right: 6px;
  margin-bottom: 10px;
}

.login-section .form-section h3 {
  font-size: 22px;
}

.login-section .default-form .form-group > label,
.login-section .default-form .form-group label {
  font-size: 14px;
}

.login-section .default-form input[type="text"],
.login-section .default-form input[type="email"],
.login-section .default-form input[type="password"] {
  height: 50px;
  font-size: 14px;
  line-height: 30px;
  padding: 10px 14px;
}

.login-section .default-form input[type="password"] {
  padding-right: 42px;
}

.login-section .theme-btn,
.login-section .mode-btn,
.login-section .social-btn-two {
  font-size: 14px;
  min-height: 40px;
  line-height: 40px;
  padding: 0 14px;
}

.login-section .role-btn {
  min-height: 50px;
  line-height: 50px;
  font-size: 14px;
  padding: 0 10px;
}

.login-section a {
  font-size: 14px;
}

.login-section i.la,
.login-section i.fa,
.login-section i.fab {
  font-size: 14px;
}

/* Keep primary form action buttons inside full form width */
#login-inline form > .theme-btn,
#register-basic-form > .theme-btn {
  display: block;
  width: 100%;
}

.login-section .remember-forgot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-section .remember-forgot-row .remember-device {
  margin-bottom: 0;
}

.login-section .remember-forgot-row .remember-device label {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.login-section .remember-forgot-row .forgot-password-wrap {
  margin-left: auto;
  text-align: right;
}

.login-section .remember-forgot-row .forgot-password-wrap a {
  white-space: nowrap;
}

@media (max-width: 575px) {
  .login-section .remember-forgot-row {
    flex-wrap: wrap;
  }

  .login-section .remember-forgot-row .forgot-password-wrap {
    width: 100%;
    text-align: left;
  }
}

/* =====================================================
   LOGIN / REGISTER - RESPONSIVE FIXES
   ===================================================== */

@media (max-width: 1199px) {
  body:not(.dashboard) .main-header {
    position: relative !important;
  }

  body:not(.dashboard) .main-header .container-fluid {
    padding: 0 16px;
  }

  body:not(.dashboard) .main-header .main-box {
    min-height: 72px;
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }

  body:not(.dashboard) .main-header .logo-box,
  body:not(.dashboard) .main-header .outer-box {
    width: auto;
    height: auto;
    padding: 0;
  }

  body:not(.dashboard) #auth-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
  }

  body:not(.dashboard) .mode-btn {
    padding: 6px 14px;
    min-height: 38px;
    line-height: 38px;
    font-size: 13px;
    border-radius: 8px;
  }

  body:not(.dashboard) .login-section {
    padding-top: 10px;
  }

  .login-section .outer-box {
    padding: 0 16px;
  }

  .login-section .login-form {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    margin-top: -8px;
  }

  .login-section .form-inner {
    padding: 24px;
  }

  .login-section .form-inner h4 {
    font-size: 24px;
    line-height: 1.3;
  }

  .login-section .form-section h3 {
    font-size: 20px;
  }

  .login-section .default-form input[type="text"],
  .login-section .default-form input[type="email"],
  .login-section .default-form input[type="password"] {
    height: 46px;
    line-height: 22px;
    font-size: 14px;
  }

  .toggle-password {
    top: 44px;
  }
}

@media (max-width: 991px) {
  .login-section .form-inner {
    padding: 20px;
  }

  .login-section #mode-title {
    margin-bottom: 8px;
  }

  .login-section #role-selection {
    margin-bottom: 8px;
  }

  #role-selection .btn-box .col-lg-4,
  #social-login .btn-box .col-lg-6 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }

  .login-section .role-btn,
  .login-section .social-btn-two {
    width: 100%;
    min-height: 42px;
    line-height: 42px;
  }
}

@media (max-width: 767px) {
  body:not(.dashboard) .login-section {
    padding-top: 6px;
  }

  .login-section .login-form {
    margin-top: 0;
  }

  body:not(.dashboard) .main-header .main-box {
    justify-content: center;
    text-align: center;
  }

  body:not(.dashboard) .main-header .outer-box {
    width: 100%;
    justify-content: center;
    display: flex;
  }

  body:not(.dashboard) #auth-buttons {
    justify-content: center;
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    gap: 10px;
  }

  body:not(.dashboard) #auth-buttons .mode-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    line-height: 40px;
    padding: 0 8px;
    font-size: 13px;
    text-align: center;
    width: 100%;
  }

  .login-section .outer-box {
    padding: 0 12px;
  }

  .login-section .form-inner {
    padding: 16px;
  }

  .login-section .form-inner h4 {
    font-size: 21px;
  }

  .login-section #mode-title {
    margin-bottom: 6px;
  }

  .login-section #role-selection {
    margin-bottom: 6px;
  }

  .login-section #role-selection .btn-box > [class*="col-"] {
    margin-bottom: 8px;
    padding-left: 0;
    padding-right: 0;
  }

  .login-section .form-section h3 {
    font-size: 18px;
  }

  .login-section .default-form .form-group > label,
  .login-section .default-form .form-group label,
  .login-section a,
  .login-section .theme-btn {
    font-size: 13px;
  }

  .login-section .default-form input[type="text"],
  .login-section .default-form input[type="email"],
  .login-section .default-form input[type="password"] {
    height: 44px;
    font-size: 13px;
    padding: 9px 12px;
  }

  .login-section .default-form input[type="password"] {
    padding-right: 38px;
  }

  .toggle-password {
    right: 12px;
    top: 42px;
    font-size: 13px;
  }
}

/* Ensure auth header buttons remain visible on mobile/tablet */
@media (max-width: 1023px) {
  body:not(.dashboard) .main-header .main-box {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
  }

  body:not(.dashboard) .main-header .outer-box {
    display: flex !important;
  }

  body:not(.dashboard) #auth-buttons {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body:not(.dashboard) .mobile-header {
    display: none !important;
  }
}




/* iPad + tablet auth header refinement */
@media (min-width: 768px) and (max-width: 1366px) {
  body:not(.dashboard) .main-header {
    position: relative !important;
  }

  body:not(.dashboard) .main-header .main-box {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    min-height: 72px;
    height: auto;
    padding: 10px 16px;
  }

  body:not(.dashboard) .main-header .logo-box {
    width: auto;
    height: auto;
    padding-left: 0;
    margin-right: 12px;
    flex: 0 0 auto;
  }

  body:not(.dashboard) .main-header .outer-box {
    width: auto;
    height: auto;
    margin-left: auto;
    padding-right: 0;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
  }

  body:not(.dashboard) #auth-buttons {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
    margin: 0;
  }

  body:not(.dashboard) #auth-buttons .mode-btn {
    min-height: 40px;
    line-height: 40px;
    padding: 0 14px;
    font-size: 13px;
    white-space: nowrap;
  }
}

/* Remove unwanted page scroll on auth page */
html,
body {
  height: 100%;
}

/* No scroll while only role selection is visible */
body.auth-no-scroll {
  overflow-y: hidden;
}

body.auth-no-scroll .page-wrapper {
  height: 100vh;
  overflow: hidden;
}

body:not(.dashboard) .page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body:not(.dashboard) .main-header {
  flex: 0 0 auto;
}

body:not(.dashboard) .login-section {
  flex: 1 1 auto;
  min-height: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

body:not(.dashboard) .login-section .outer-box {
  min-height: 0;
}

@media only screen and (min-width: 1200px) {
  body:not(.dashboard) .login-section {
    min-height: calc(100vh - 80px) !important;
    padding-top: 80px !important;
  }
}

/* Match new login visual: move role block slightly upward */
@media (min-width: 1200px) {
  body:not(.dashboard) .login-section .login-form {
    margin-top: -88px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  body:not(.dashboard) .login-section .login-form {
    margin-top: -56px;
  }
}
