/* ═══════════════════════════════════════════════════════
   NCAT Certificate System — Auth Pages Stylesheet (v2)
   dash_settings/css/auth.css
   Covers: login.php, cpassword.php, cpasswordf_reset.php

   Fixes from design review:
   - Font sizes switched from rem to px. The reference template's
     rem values were computed against ITS OWN root font-size; on
     this app's pages the inherited root font-size is different,
     so the same rem numbers rendered visibly smaller. Px values
     render the same everywhere regardless of what else is loaded
     on the page.
   - The top navbar is `navbar-fixed-top` (position:fixed) and
     nothing in the existing theme (startmin.css) compensates for
     that with body padding, so the auth card was sitting flush
     against/under the navbar. Fixed with body.auth-page padding-top.
   - New split layout: a sky-blue aircraft visual panel alongside
     the form, instead of a single narrow card.
   ═══════════════════════════════════════════════════════ */

:root {
  --nc-navy:        #1a3a5c;
  --nc-sky:         #008dd4;
  --nc-sky-dark:    #006ba3;
  --nc-navy-light:  #e8eef7;
  --nc-text:        #2d3a3a;
  --nc-muted:       #607d7b;
  --nc-border:      #dce8e6;
  --nc-input-bg:    #f7fbfa;
  --nc-shadow:      0 10px 45px rgba(0,60,100,.18);
  --nc-radius:      16px;
}

/* ── Page Background ────────────────────────────────── */
body.auth-page,
html body.auth-page {
  margin: 0; padding: 0;
  min-height: 100vh;
  /* Compensate for navbar-fixed-top (~50px) so the card doesn't
     sit underneath it - this was the "no space in between" bug. */
  padding-top: 70px;
  background: linear-gradient(135deg, #e8eef7 0%, #f0f4fc 40%, #eaf4ff 100%);
  font-family: 'Segoe UI', Arial, sans-serif;
}

body.auth-page::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image:
    radial-gradient(circle at 15% 85%, rgba(0,141,212,.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 15%, rgba(26,58,92,.07) 0%, transparent 50%);
  pointer-events: none;
}

/* ── Auth Wrapper ───────────────────────────────────── */
.auth-wrapper {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  padding: 20px 16px 40px;
}

/* ── Auth Card (split layout: visual panel + form panel) ── */
.auth-card {
  background: #fff;
  border-radius: var(--nc-radius);
  box-shadow: var(--nc-shadow);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  animation: authFadeIn .45s ease;
}
.auth-card.auth-card-split {
  max-width: 900px;
  display: flex;
  flex-direction: row;
  min-height: 560px;
}
@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Visual panel (aircraft photos + sky-blue overlay) ──── */
.auth-visual-panel {
  position: relative;
  flex: 0 0 44%;
  max-width: 44%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #fff;
}
.auth-visual-panel .auth-visual-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.auth-visual-panel .auth-visual-photo.photo-top    { height: 55%; top: 0; }
.auth-visual-panel .auth-visual-photo.photo-bottom { height: 48%; top: 52%; }
.auth-visual-panel::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(190deg, rgba(0,141,212,.55) 0%, rgba(26,58,92,.82) 100%);
}
.auth-visual-caption {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 26px 24px;
}
.auth-visual-caption h4 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}
.auth-visual-caption p {
  font-size: 13px;
  opacity: .9;
  margin: 0;
  line-height: 1.5;
}
.auth-visual-badge {
  position: relative;
  z-index: 2;
  padding: 22px 24px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-visual-badge img {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  padding: 3px;
}
.auth-visual-badge span {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

/* ── Form panel ─────────────────────────────────────── */
.auth-form-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* ── Card Header Band (used on single-column pages too) ── */
.auth-card-header {
  background: linear-gradient(135deg, var(--nc-navy) 0%, var(--nc-sky) 100%);
  padding: 30px 32px 24px;
  text-align: center;
  color: #fff;
  position: relative;
}
.auth-header-logo {
  width: 68px; height: 68px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.4);
  object-fit: contain;
  background: rgba(255,255,255,.15);
  padding: 6px;
  margin-bottom: 12px;
}
.auth-card-header h3 {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .3px;
}
.auth-card-header h3 i { margin-right: 6px; }
.auth-card-header p {
  margin: 0;
  font-size: 13px;
  opacity: .85;
}

/* ── Card Body ──────────────────────────────────────── */
.auth-card-body {
  padding: 30px 32px 24px;
  flex: 1 1 auto;
}

/* ── Status Alert ───────────────────────────────────── */
.auth-alert {
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.auth-alert.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.auth-alert.error   { background: #fdecea; color: #c62828; border: 1px solid #ef9a9a; }

/* ── Form Group ─────────────────────────────────────── */
.auth-form-group {
  margin-bottom: 18px;
}
.auth-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--nc-text);
  margin-bottom: 6px;
  letter-spacing: .3px;
}

/* ── Input with Icon ─────────────────────────────────── */
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-wrap .auth-input-icon {
  position: absolute;
  left: 13px;
  color: var(--nc-muted);
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
}
.auth-input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1.5px solid var(--nc-border);
  border-radius: 9px;
  background: var(--nc-input-bg);
  font-size: 14px;
  color: var(--nc-text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  height: auto;
  box-shadow: none;
}
.auth-input-wrap input:focus {
  border-color: var(--nc-sky);
  box-shadow: 0 0 0 3px rgba(0,141,212,.12);
  background: #fff;
}
.auth-input-wrap input::placeholder { color: #aabab8; }

.auth-input-wrap .auth-pw-toggle {
  position: absolute; right: 13px;
  color: var(--nc-muted); cursor: pointer;
  font-size: 15px; user-select: none;
}

/* ── Submit Button ──────────────────────────────────── */
.auth-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--nc-navy) 0%, var(--nc-sky) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .2s, transform .15s;
  margin-top: 4px;
}
.auth-btn:hover   { opacity: .92; transform: translateY(-1px); color: #fff; text-decoration: none; }
.auth-btn:active  { transform: translateY(0); opacity: 1; }

/* ── Divider ─────────────────────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 0 16px;
  color: var(--nc-muted); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--nc-border);
}

/* ── Footer Links ────────────────────────────────────── */
.auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--nc-muted);
  margin-top: 4px;
}
.auth-footer a {
  color: var(--nc-sky-dark);
  font-weight: 600;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* ── Card Footer Strip ────────────────────────────────── */
.auth-card-footer {
  background: var(--nc-navy-light);
  padding: 13px 32px;
  text-align: center;
  font-size: 12px;
  color: var(--nc-muted);
  border-top: 1px solid var(--nc-border);
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 767px) {
  .auth-card.auth-card-split { flex-direction: column; min-height: 0; }
  .auth-visual-panel { flex: 0 0 auto; max-width: 100%; min-height: 170px; }
  .auth-visual-caption { padding: 16px 20px; }
  .auth-visual-caption p { display: none; }
}
@media (max-width: 480px) {
  .auth-card-body, .auth-card-header { padding-left: 20px; padding-right: 20px; }
  .auth-card { border-radius: 12px; }
}
