/* =============================================================================
   Auth Pages CSS  –  login · forgot-password · general-queries · access-denied
   Follows updated-dashboard.css design tokens
   Primary: #683091  |  Background: #f8f9fd
   ============================================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- Design Tokens (mirror updated-dashboard.css) ---------- */
:root {
  --ud-primary:        #683091;
  --ud-primary-light:  #f0ddff;
  --ud-primary-bg:     #faf5ff;
  --ud-bg:             #f8f9fd;
  --ud-white:          #ffffff;
  --ud-border:         #e7e7e7;
  --ud-border-light:   #f0f0f4;
  --ud-text-dark:      #000000;
  --ud-text-body:      #3d3d3d;
  --ud-text-muted:     #6d6d6d;
  --ud-text-gray:      #888888;
  --ud-green:          #0eab4f;
  --ud-red:            #da0421;
  --ud-font:           "Inter", "Noto Sans Bengali", sans-serif;
  --ud-radius-pill:    100px;
  --ud-radius-md:      12px;
  --ud-radius-sm:      6px;
  --ud-shadow:         0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ---------- Base ---------- */
.auth-page {
  font-family:      var(--ud-font);
  background:       var(--ud-bg);
  color:            var(--ud-text-dark);
  height:           auto;
  min-height:       100vh;
  overflow-y:       auto;
  display:          flex;
  align-items:      center;
  justify-content:  center;
  padding:          16px;
}

/* ---------- Card Container ---------- */
.auth-card {
  display:          flex;
  max-width:        900px;
  width:            100%;
  background:       var(--ud-white);
  border-radius:    var(--ud-radius-md);
  box-shadow:       0 4px 24px rgba(104, 48, 145, 0.08), var(--ud-shadow);
  overflow:         hidden;
}

/* Pages with a scrollable wrapper (forgot-password, general-queries) override
   the card's fixed height so content is never clipped */
.auth-page-stack .auth-card {
  max-height:       none;
  overflow:         hidden;
}

/* ---------- Left Branding Panel ---------- */
.auth-brand {
  flex:             0 0 38%;
  background:       linear-gradient(160deg, #8e44ad, var(--ud-primary) 60%, #4a1a6b);
  display:          flex;
  flex-direction:   column;
  align-items:      center;
  justify-content:  center;
  padding:          40px 28px;
  text-align:       center;
  color:            #fff;
  position:         relative;
  overflow:         hidden;
}

.auth-brand::before {
  content:          '';
  position:         absolute;
  inset:            0;
  background:       url('/assets/img/login-bg.jpg') center/cover no-repeat;
  opacity:          0.1;
  pointer-events:   none;
}

.auth-brand::after {
  content:          '';
  position:         absolute;
  width:            300px;
  height:           300px;
  border-radius:    50%;
  background:       rgba(255, 255, 255, 0.04);
  top:              -80px;
  right:            -80px;
  pointer-events:   none;
}

.auth-back-btn {
  position:         fixed;
  top:              20px;
  left:             20px;
  display:          inline-flex;
  align-items:      center;
  gap:              6px;
  font-family:      var(--ud-font);
  font-size:        13px;
  font-weight:      500;
  color:            var(--ud-primary);
  text-decoration:  none;
  background:       var(--ud-white);
  border:           1px solid var(--ud-border);
  border-radius:    var(--ud-radius-sm);
  padding:          7px 14px;
  box-shadow:       var(--ud-shadow);
  transition:       background 0.15s, color 0.15s;
  z-index:          100;
}

.auth-back-btn:hover {
  background:       var(--ud-primary-bg);
  color:            var(--ud-primary);
}

.auth-brand__logo {
  width:            120px;
  height:           120px;
  border-radius:    50%;
  background:       rgba(255,255,255,0.12);
  border:           2px solid rgba(255,255,255,0.2);
  padding:          10px;
  object-fit:       contain;
  position:         relative;
  z-index:          1;
}

.auth-brand__title {
  font-size:        18px;
  font-weight:      600;
  margin-top:       18px;
  line-height:      1.5;
  position:         relative;
  z-index:          1;
  max-width:        260px;
}

/* ---------- Right Form Panel ---------- */
.auth-form-panel {
  flex:             1;
  padding:          36px 40px;
  display:          flex;
  flex-direction:   column;
  justify-content:  center;
  overflow:         hidden;
}

.auth-form-panel__heading {
  font-size:        22px;
  font-weight:      700;
  color:            var(--ud-primary);
  margin-bottom:    4px;
}

.auth-form-panel__subheading {
  font-size:        13px;
  color:            var(--ud-text-muted);
  margin-bottom:    20px;
}

/* ---------- Form Elements ---------- */
.auth-form .form-group {
  margin-bottom:    14px;
  display:          block;
}

.auth-form .form-label {
  display:          block;
  font-size:        13px;
  font-weight:      500;
  color:            var(--ud-text-body);
  margin-bottom:    5px;
}

.auth-form .form-control {
  width:            100%;
  height:           40px;
  padding:          6px 12px;
  font-family:      var(--ud-font);
  font-size:        14px;
  color:            var(--ud-text-dark);
  background:       var(--ud-white);
  border:           1px solid var(--ud-border);
  border-radius:    var(--ud-radius-sm);
  transition:       border-color 0.15s, box-shadow 0.15s;
  box-sizing:       border-box;
}

.auth-form .form-control:focus {
  outline:          none;
  border-color:     var(--ud-primary);
  box-shadow:       0 0 0 3px rgba(104, 48, 145, 0.12);
}

.auth-form textarea.form-control {
  height:           auto;
  min-height:       64px;
  resize:           vertical;
}

/* ---------- Input Group (icon + input joined) ---------- */
.auth-form .input-group {
  display:          flex;
  align-items:      stretch;
  width:            100%;
  position:         relative;
}

.auth-form .input-group .input-group-text {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  width:            40px;
  min-width:        40px;
  height:           40px;
  padding:          0;
  background:       var(--ud-primary-bg);
  border:           1px solid var(--ud-border);
  border-right:     0;
  border-radius:    var(--ud-radius-sm) 0 0 var(--ud-radius-sm);
  color:            var(--ud-primary);
  font-size:        14px;
  flex-shrink:      0;
  box-sizing:       border-box;
}

.auth-form .input-group .form-control {
  flex:             1;
  border-radius:    0 var(--ud-radius-sm) var(--ud-radius-sm) 0;
  border-left:      0;
  min-width:        0;
}

.auth-form .input-group .form-control:focus {
  border-color:     var(--ud-primary);
  box-shadow:       0 0 0 3px rgba(104, 48, 145, 0.12);
}

/* Password show/hide toggle button */
.auth-form .input-group .auth-password-input {
  border-radius:    0;
}

.auth-form .input-group .btn-password-toggle {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  width:            40px;
  min-width:        40px;
  height:           40px;
  padding:          0;
  background:       transparent;
  border:           1px solid var(--ud-border);
  border-left:      0;
  border-radius:    0 var(--ud-radius-sm) var(--ud-radius-sm) 0;
  color:            var(--ud-text-sub, #6c757d);
  font-size:        14px;
  cursor:           pointer;
  flex-shrink:      0;
  box-sizing:       border-box;
}

.auth-form .input-group:focus-within .btn-password-toggle {
  border-color:     var(--ud-primary);
}

.auth-form .input-group .form-control:focus + .input-group-text,
.auth-form .input-group:focus-within .input-group-text {
  border-color:     var(--ud-primary);
}

/* ---------- Select ---------- */
.auth-form .custom-select,
.auth-form select.form-control {
  width:            100%;
  height:           40px;
  padding:          6px 12px;
  font-family:      var(--ud-font);
  font-size:        14px;
  color:            var(--ud-text-dark);
  background:       var(--ud-white);
  border:           1px solid var(--ud-border);
  border-radius:    var(--ud-radius-sm);
  appearance:       auto;
  cursor:           pointer;
}

.auth-form .custom-select:focus,
.auth-form select.form-control:focus {
  outline:          none;
  border-color:     var(--ud-primary);
  box-shadow:       0 0 0 3px rgba(104, 48, 145, 0.12);
}

/* ---------- Buttons ---------- */
.auth-btn {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  width:            100%;
  height:           42px;
  padding:          0 24px;
  font-family:      var(--ud-font);
  font-size:        15px;
  font-weight:      600;
  color:            #fff;
  background:       var(--ud-primary);
  border:           none;
  border-radius:    var(--ud-radius-sm);
  cursor:           pointer;
  transition:       background 0.15s, box-shadow 0.15s, transform 0.1s;
  text-decoration:  none;
  letter-spacing:   0.2px;
}

.auth-btn:hover {
  background:       #7a3ba3;
  box-shadow:       0 4px 12px rgba(104, 48, 145, 0.3);
  color:            #fff;
  transform:        translateY(-1px);
}

.auth-btn:active {
  background:       #5a2578;
  transform:        translateY(0);
}

.auth-btn--outline {
  background:       transparent;
  color:            var(--ud-primary);
  border:           1px solid var(--ud-primary);
}

.auth-btn--outline:hover {
  background:       var(--ud-primary-light);
  color:            var(--ud-primary);
}

/* ---------- Links ---------- */
.auth-links {
  display:          flex;
  justify-content:  space-between;
  margin-bottom:    14px;
}

.auth-link {
  font-size:        12px;
  font-weight:      500;
  color:            var(--ud-primary);
  text-decoration:  none;
  transition:       color 0.15s;
}

.auth-link:hover {
  color:            #7a3ba3;
  text-decoration:  underline;
}

/* ---------- Alerts / Messages ---------- */
.auth-alert {
  padding:          8px 12px;
  border-radius:    var(--ud-radius-sm);
  font-size:        13px;
  margin-bottom:    12px;
}

.auth-alert--danger {
  background:       #fef2f2;
  color:            var(--ud-red);
  border:           1px solid #fecaca;
}

.auth-alert--success {
  background:       #f0fdf4;
  color:            var(--ud-green);
  border:           1px solid #bbf7d0;
}

.auth-alert--info {
  background:       var(--ud-primary-bg);
  color:            var(--ud-primary);
  border:           1px solid var(--ud-primary-light);
}

/* ---------- Footer Logos ---------- */
.auth-footer {
  margin-top:       20px;
  text-align:       center;
}

.auth-footer__img {
  max-width:        100%;
  height:           auto;
  max-height:       40px;
  object-fit:       contain;
  opacity:          0.8;
}

/* ---------- Access Denied ---------- */
.auth-denied-wrap {
  display:          flex;
  align-items:      center;
  justify-content:  center;
  height:           calc(100vh - 140px);
  overflow:         hidden;
}

.auth-denied {
  max-width:        520px;
  text-align:       center;
  padding:          48px 40px;
}

.auth-denied__eyebrow {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  padding:          6px 12px;
  margin:           0 auto 14px;
  border-radius:    var(--ud-radius-pill);
  background:       rgba(104, 48, 145, 0.08);
  color:            var(--ud-primary);
  font-size:        12px;
  font-weight:      700;
  letter-spacing:   .08em;
  text-transform:   uppercase;
}

.auth-denied__icon {
  width:            76px;
  height:           76px;
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  border-radius:    50%;
  margin-bottom:    18px;
  background:       rgba(218, 4, 33, 0.10);
  color:            var(--ud-red);
  font-size:        30px;
  box-shadow:       inset 0 0 0 1px rgba(218, 4, 33, 0.08);
}

.auth-denied__title {
  font-size:        26px;
  font-weight:      700;
  color:            var(--ud-primary);
  margin-bottom:    10px;
}

.auth-denied__desc {
  font-size:        16px;
  color:            var(--ud-text-muted);
  margin-bottom:    4px;
  line-height:      1.6;
}

.auth-denied__desc-en {
  font-size:        14px;
  color:            var(--ud-text-gray);
  margin-bottom:    24px;
}

.auth-btn--back {
  width:            auto;
  min-width:        180px;
  margin:           0 auto;
  padding-inline:   24px;
  box-shadow:       0 10px 20px rgba(104, 48, 145, 0.12);
}

.auth-btn--back:hover {
  transform:        translateY(-1px);
  box-shadow:       0 14px 26px rgba(104, 48, 145, 0.16);
}

/* ---------- Help Block ---------- */
.auth-form .help-block,
.auth-form .text-danger {
  font-size:        12px;
  color:            var(--ud-red);
  margin-top:       3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .auth-card {
    flex-direction: column;
    max-width:      480px;
    max-height:     none;
  }

  .auth-brand {
    flex:           0 0 auto;
    padding:        24px 20px;
    min-height:     160px;
  }

  .auth-brand__logo {
    width:          76px;
    height:         76px;
    padding:        10px;
  }

  .auth-brand__title {
    font-size:      14px;
    margin-top:     10px;
  }

  .auth-form-panel {
    flex:           1;
    padding:        20px;
    overflow-y:     visible;
  }

  .auth-form-panel__heading {
    font-size:      18px;
  }

  .auth-form .form-group {
    margin-bottom:  10px;
  }

  .auth-denied-wrap {
    height:         calc(100vh - 120px);
  }

  .auth-denied {
    padding:        32px 20px;
  }
}


