/* ============================================================
   Uniqueue — auth.css
   Layout: split panel (maroon brand panel + cream form panel)
   Palette: #660810 maroon · #270707 maroon-deep · #f1ebeb cream · #d6c0b1 tan
   Type: Helvetica only (site-wide, via theme.css)
   ============================================================ */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:          #660810;
  --red-deep:     #4a0a10;
  --red-deeper:   #270707;
  --red-bright:   #8a1220;
  --red-glow:     rgba(102, 8, 16, 0.16);
  --red-soft:     rgba(102, 8, 16, 0.06);
  --tan:          #d6c0b1;
  --white:        #fffdfc;
  --off-white:    #f1ebeb;
  --ink:          #270707;
  --ink-mid:      #5c4747;
  --ink-light:    #97898a;
  --border:       rgba(39, 7, 7, 0.12);
  --shadow-sm:    0 1px 2px rgba(20, 10, 10, 0.05);
  --shadow-md:    0 4px 16px rgba(20, 10, 10, 0.08);
  --shadow-lg:    0 16px 40px rgba(20, 10, 10, 0.10);
  --radius:       14px;
  --radius-sm:    10px;
  --transition:   0.18s ease;
  --font:         Helvetica, Arial, sans-serif;
  --font-display: Helvetica, Arial, sans-serif;
  --success:       #2e7d32;
  --success-light: #dff6dd;
}

/* ── Wrapper for AJAX page swaps — must not affect layout ─── */
#page-content {
  display: contents;
}

html, body { height: 100%; }

/* ── Auth body ────────────────────────────────────────────── */
.auth-body {
  font-family: var(--font);
  font-weight: 400;
  /* background behind the floating card — visible sa gutter/border */
  background: var(--off-white);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  /* space sa gilid ng browser papuntang card */
  padding: 1.75rem;
}

/* ── Split layout ─────────────────────────────────────────── */
/* Dalawang hiwalay na "card" (brand image + form) na may gap sa pagitan,
   sa halip na iisang box lang ang naka-round. */
.auth-split {
  display: flex;
  width: 100%;
  min-height: calc(100vh - 3.5rem); /* i-offset yung body padding */
  gap: 1.5rem;
}

/* ── Left brand panel ─────────────────────────────────────── */
.auth-brand {
  flex: 0 0 50%;
  background: var(--red);
  background-image:
    linear-gradient(180deg, rgba(102,8,16,0.28) 0%, rgba(39,7,7,0.32) 55%, rgba(39,7,7,0.55) 100%),
    url("../img/mob.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  /* sarili nang rounded "card" ngayon, kaya kailangan ng radius + shadow */
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}

/* subtle depth: one soft glow + a faint grid, no busy gradients */
.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle 620px at 100% 100%, rgba(214,192,177,0.10), transparent 60%),
        radial-gradient(circle 480px at 0% 0%, rgba(255,255,255,0.06), transparent 55%);
    pointer-events: none;
}

.auth-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(circle 480px at 50% 40%, black, transparent 75%);
    mask-image: radial-gradient(circle 480px at 50% 40%, black, transparent 75%);
    pointer-events: none;
}

.auth-brand__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  gap: 1.4rem;
  max-width: 360px;
  position: relative;
  z-index: 1;
}

.auth-brand__logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 0.6rem;
  box-shadow: none;
  margin-bottom: 0.4rem;
}

.auth-brand__text {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.auth-brand__title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 2.35rem;
  color: var(--white);
  letter-spacing: 0.01em;
  line-height: 1.02;
}

.auth-brand__tagline {
  font-size: 0.96rem;
  font-weight: 300;
  color: rgba(241,235,235,0.72);
  letter-spacing: 0.1px;
  line-height: 1.5;
}

.auth-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.6rem;
}

.auth-features__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-radius: 0;
  padding: 0.85rem 0;
  color: rgba(241,235,235,0.85);
  font-size: 0.88rem;
  font-weight: 400;
  transition: padding-left var(--transition), color var(--transition);
}

.auth-features__item:hover {
  color: var(--white);
  padding-left: 0.35rem;
}

.auth-features__item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.75;
    color: var(--tan);
}

.auth-brand__footer {
    position: absolute;
    bottom: -2.2rem;
    left: 0;
    right: 0;
    text-align: left;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
}

/* ── Sign-up brand variant: chip list instead of feature rows ─ */
.auth-brand__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.4rem;
}

.stat-chip {
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  padding: 0.5rem 1rem;
}

.stat-chip__label {
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(241,235,235,0.88);
  white-space: nowrap;
}

/* ── Right form panel ─────────────────────────────────────── */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center; /* Center vertically by default */
  justify-content: center;
  background: var(--off-white);
  padding: 2.5rem 1.5rem;
  overflow-y: auto; /* Allow vertical scroll for long forms */
  /* Itago ang scrollbar visually pero gumagana pa rin ang scroll */
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* old Edge / IE */
}

.auth-form-panel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, new Edge */
}

/* ── Auth card ────────────────────────────────────────────── */
/* Override for signup.php to keep content aligned to top for scrolling */
.auth-split--reverse .auth-form-panel {
  align-items: flex-start;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2.5rem 2.75rem;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

/* Sliding highlight behind the active tab */
.auth-tabs {
  position: relative;
}

.auth-tabs__highlight {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: var(--white);
  border-radius: var(--radius-xs, 7px);
  box-shadow: none;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  z-index: 0;
}

.auth-tab {
  position: relative;
  z-index: 1;
}

.auth-tab--active {
  background: transparent;
  box-shadow: none;
}

.auth-card--wide {
  max-width: 520px;
}

.auth-card__heading {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.65rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
  letter-spacing: 0.01em;
}

.auth-card__subheading {
  font-size: 0.88rem;
  color: var(--ink-light);
  margin-bottom: 1.4rem;
  line-height: 1.5;
}

.auth-card__help {
  font-size: 0.85rem;
  color: var(--ink-light);
  text-align: center;
  line-height: 1.5;
  overflow: hidden;
  max-height: 3rem;
  margin-top: 1.4rem;
  opacity: 1;
  transition: max-height 0.28s cubic-bezier(.4,0,.2,1),
              margin-top 0.28s cubic-bezier(.4,0,.2,1),
              opacity 0.2s ease;
}

.auth-card__help.is-hidden {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
}

.auth-card__help a {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}

.auth-card__help a:hover { text-decoration: underline; }

/* ── Role tabs ────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  background: var(--off-white);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 1.6rem;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-xs, 7px);
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--ink-mid);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.auth-tab:hover {
  color: var(--red);
}

.auth-tab--active {
  background: var(--white);
  color: var(--red);
  box-shadow: none;
  font-weight: 600;
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.87rem;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

.alert--success {
  background: #f0faf3;
  color: #1a6b35;
  border: 1px solid #b2dfcc;
}

.alert--error {
  background: #fdf5f5;
  color: var(--red-deep);
  border: 1px solid rgba(102, 8, 16, 0.18);
}

.alert__list {
  list-style: disc;
  padding-left: 1.1rem;
}

.alert__list li + li { margin-top: 0.2rem; }

/* ── Form elements ────────────────────────────────────────── */
.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group { flex: 1; }

.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-mid);
  margin-bottom: 0.4rem;
  letter-spacing: 0.2px;
}

.form-input {
  width: 100%;
  height: 46px;
  padding: 0 1rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.94rem;
  font-weight: 400;
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%235c4747' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-input::placeholder { color: var(--ink-light); }

.form-input:hover {
  border-color: rgba(102, 8, 16, 0.28);
}

.form-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

/* ── Error / empty-field state ────────────────────────────── */
.form-input.is-error {
  border-color: var(--red-bright) !important;
  background: #fdf5f5;
  animation: shake-error 0.32s ease;
}

.form-input.is-error:focus {
  box-shadow: 0 0 0 3px rgba(138, 18, 32, 0.18);
}

.field-error {
  display: block;
  font-size: 0.76rem;
  color: var(--red-bright);
  margin-top: 0.35rem;
  font-weight: 500;
}

@keyframes shake-error {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.field-hint {
  display: block;
  font-size: 0.76rem;
  color: var(--ink-light);
  margin-top: 0.4rem;
}

.field-match {
  display: block;
  font-size: 0.76rem;
  margin-top: 0.4rem;
}

.field-match--ok { color: #1a6b35; }
.field-match--bad { color: var(--red-deep); }

/* ── Password toggle wrapper ──────────────────────────────── */
.input-icon-wrap {
  position: relative;
}

.input-icon-wrap .form-input {
  padding-right: 3rem;
}

.toggle-password {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--ink-light);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.toggle-password:hover { color: var(--red); }

.toggle-password svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ── Row: password label + forgot link ───────────────────── */
.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.form-label-row .form-label { margin-bottom: 0; }

.forgot-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
}

.forgot-link:hover { text-decoration: underline; }

/* ── Password strength meter ──────────────────────────────── */
.pw-strength {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pw-strength__bar {
  flex: 1;
  height: 5px;
  background: var(--off-white);
  border-radius: 100px;
  overflow: hidden;
}

.pw-strength__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--red);
  border-radius: 100px;
  transition: width var(--transition), background var(--transition);
}

.pw-strength__fill[data-level="weak"] {
  width: 20%;
  background: #c0392b;
}

.pw-strength__fill[data-level="fair"] {
  width: 40%;
  background: #e67e22;
}

.pw-strength__fill[data-level="good"] {
  width: 60%;
  background: #e6c92e;
}

.pw-strength__fill[data-level="strong"] {
  width: 80%;
  background: #7cb518;
}

.pw-strength__fill[data-level="very-strong"] {
  width: 100%;
  background: #1a6b35;
}

.pw-strength__label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-light);
  white-space: nowrap;
  transition: color var(--transition);
}

.pw-strength__label[data-level="weak"] {
  color: #c0392b;
}

.pw-strength__label[data-level="fair"] {
  color: #e67e22;
}

.pw-strength__label[data-level="good"] {
  color: #b89b0a;
}

.pw-strength__label[data-level="strong"] {
  color: #7cb518;
}

.pw-strength__label[data-level="very-strong"] {
  color: #1a6b35;
}

.pw-requirements {
  list-style: none;
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.8rem;
}

.pw-requirements li {
  font-size: 0.76rem;
  color: #c0392b;
  position: relative;
  padding-left: 1.1rem;
  transition: color 0.15s ease;
}

.pw-requirements li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c0392b;
  transition: background 0.15s ease;
}

.pw-requirements li.met {
  color: #1a6b35;
}

.pw-requirements li.met::before {
  background: #1a6b35;
}

/* ── Submit button ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: var(--red);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--red-deep);
}

.btn--primary:active {
  background: var(--red-deeper);
}

.btn--full {
  width: 100%;
  height: 48px;
  margin-top: 0.4rem;
}

.btn__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn--loading .btn__spinner { display: block; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Divider ──────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1.1rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-size: 0.76rem;
  color: var(--ink-light);
  white-space: nowrap;
}

/* ── Card-level brand (mobile only, see responsive section) ─ */
.auth-card__brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.4rem;
}
.auth-card__brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}
.auth-card__brand-text {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--red);
}

/* ── Google sign-in button ────────────────────────────────── */
.google-auth-block {
  width: 100%;
}

.btn--google {
  background: var(--white);
  color: var(--ink);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn--google:hover {
  background: var(--off-white);
  border-color: rgba(39, 7, 7, 0.2);
}

.btn--google:active {
  background: var(--tan);
}

.btn--google svg {
  flex-shrink: 0;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-brand { flex: 0 0 50%; padding: 2.5rem 1.8rem; }
}

@media (max-width: 680px) {
  .auth-body { padding: 0.9rem; }

  .auth-split {
    flex-direction: column;
    gap: 0;
    min-height: calc(100vh - 1.8rem);
  }

  .auth-brand { display: none; }

  .auth-card__brand { display: flex; }

  .auth-form-panel {
    padding: 1.5rem 1rem 1.8rem;
    align-items: flex-start;
  }

  /* Login page = .auth-split (no --reverse). Center it on mobile,
     while signup (.auth-split--reverse, above) stays top-aligned. */
  .auth-split:not(.auth-split--reverse) .auth-form-panel {
    align-items: center;
    min-height: 100vh;
  }

  .auth-card {
    padding: 1.75rem 1.4rem 2rem;
    border-radius: 12px;
  }

  .form-row { flex-direction: column; gap: 0; }
}

@media (max-width: 400px) {
  .auth-card { padding: 1.5rem 1.1rem 1.8rem; }
  .auth-card__heading { font-size: 1.25rem; }
}
/* ══════════════════════════════════════════════════════════
   Signup success modal — mirrors staff-list.php's confirm modal
   (.modal-overlay / .modal-card--confirm / .confirm-modal__*)
   ══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(39, 7, 7, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
  animation: modalOverlayIn 0.2s ease-out both;
}
.modal-overlay[hidden] { display: none; }

@keyframes modalOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalCardIn 0.25s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes modalCardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-card__body { padding: 1.6rem; overflow-y: auto; }

.modal-card--confirm { max-width: 380px; }
.modal-card--confirm .modal-card__body { padding: .1rem 1.5rem 1.5rem !important; }

@keyframes confirm-icon-pop {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

.confirm-modal__sticker-wrap {
  width: 132px;
  height: 132px;
  margin: 1.1rem auto 1.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: confirm-icon-pop 0.32s 0.05s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.confirm-modal__sticker-wrap--success {
  background: radial-gradient(circle, var(--success-light) 0%, rgba(223,246,221,0) 72%);
}

.confirm-modal__sticker { width: 140px; height: 140px; display: block; }

.confirm-modal__message {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  letter-spacing: -0.3px;
  margin-bottom: 0.55rem;
}

.confirm-modal__submessage {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-light);
  text-align: center;
  max-width: 300px;
  margin: 0 auto 1.6rem;
}

.form-actions {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
}
.form-actions .btn { flex: 1; justify-content: center; max-width: 220px; }

.btn-success-solid {
  padding: 0.75rem 1.6rem;
  border: 1.5px solid transparent;
  background: var(--success-light);
  color: var(--success);
  border-color: rgba(46,125,50,0.25);
}
.btn-success-solid:hover {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
  transform: translateY(-1px);
}