/* WelfarePro — login.css */
/* Standalone full-screen page (no sidebar/topbar), so this file is
   almost entirely self-contained rather than composed from the shared
   layout/component files used by the rest of the app. Colour variables
   come from the shared tokens.css (--or/--green/--red/--text etc).

   The original prototype mixed leftover blue (#185FA5) accents with the
   orange WelfarePro brand — an incomplete rebrand, same issue found and
   fixed on dashboard.html. Fixed here with permission: every former
   var(--blue*) reference below now uses var(--or*). See memory note
   login-blue-to-orange-rebrand. */

html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text); }

/* PAGE */
.page { min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; position: relative; overflow: hidden; background: #060a10; }

/* MOSAIC */
.mosaic {
  position: absolute; inset: 0; z-index: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 4px; padding: 4px;
}
@media (max-width: 640px) { .mosaic { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(10, 1fr); } }

.mf { position: relative; overflow: hidden; border-radius: 8px; background: #1a1f2e; transition: transform .35s ease, z-index 0s; cursor: pointer; }
.mf:hover { transform: scale(1.06); z-index: 5; }

.mf img, .mf video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: brightness(0.92) saturate(1.1);
  transition: filter .4s ease, opacity .8s ease;
}
.mf:hover img, .mf:hover video { filter: brightness(1.05) saturate(1.2); }

.mf.is-video { outline: 2px solid rgba(232,97,10,.8); outline-offset: -2px; }
.mf.is-video::after {
  content: '▶'; position: absolute; top: 7px; right: 8px;
  font-size: 10px; color: #fff; background: rgba(232,97,10,.75);
  border-radius: 4px; padding: 2px 6px; pointer-events: none; z-index: 3;
  backdrop-filter: blur(4px);
}

.mosaic-overlay {
  position: absolute; inset: 0; z-index: 2;
  background:
    radial-gradient(ellipse 70% 70% at 50% 50%, transparent 30%, rgba(6,10,16,0.55) 100%),
    linear-gradient(to bottom, rgba(6,10,16,0.45) 0%, transparent 15%, transparent 80%, rgba(6,10,16,0.6) 100%);
  pointer-events: none;
}

@keyframes subtlePulse {
  0%, 100% { filter: brightness(0.88) saturate(1.05); }
  50% { filter: brightness(0.97) saturate(1.15); }
}
.mf img { animation: subtlePulse 5s ease-in-out infinite; }
.mf:nth-child(2n) img { animation-delay: -1.5s; }
.mf:nth-child(3n) img { animation-delay: -2.8s; }
.mf:nth-child(5n) img { animation-delay: -.8s; }
.mf:nth-child(7n) img { animation-delay: -4s; }
.mf:nth-child(11n) img { animation-delay: -2s; }

/* PHOTO STRIP */
.photo-strip {
  position: absolute; bottom: 16px; left: 0; right: 0; z-index: 10;
  overflow: hidden; height: 64px;
  mask-image: linear-gradient(to right, transparent, black 7%, black 93%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 7%, black 93%, transparent);
}
.strip-track { display: flex; gap: 6px; animation: sLeft 32s linear infinite; width: max-content; }
.strip-track:hover { animation-play-state: paused; }
@keyframes sLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.strip-img {
  width: 94px; height: 60px; border-radius: 7px; object-fit: cover; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.2); cursor: pointer;
  filter: brightness(0.9);
  transition: transform .25s, border-color .25s, filter .25s;
}
.strip-img:hover { transform: scale(1.1); border-color: rgba(255,255,255,.6); filter: brightness(1.05); }

/* LOGIN CARD */
.card-wrap { position: relative; z-index: 10; width: 100%; max-width: 400px; margin: 70px 16px 90px; }

.card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
}

.card-logo { display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.card-logo svg { height: 28px; width: auto; }

.pg-title { font-size: 22px; font-weight: 800; margin-bottom: 5px; color: var(--text); letter-spacing: -.02em; }
.pg-sub { font-size: 13px; color: var(--text3); margin-bottom: 24px; line-height: 1.5; }

.alert-box { display: none; align-items: center; gap: 8px; padding: 10px 13px; border-radius: var(--radius); font-size: 13px; margin-bottom: 15px; }
.alert-box.error { background: var(--red-light); border: 1px solid var(--red-border); color: var(--red); }
.alert-box.info { background: var(--or-light); border: 1px solid rgba(232,97,10,.35); color: var(--or-dark); }
.alert-box svg { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.field { margin-bottom: 17px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text2); margin-bottom: 6px; }
.iw { position: relative; }
.iw .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: #C4A898; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.iw input {
  width: 100%; padding: 11px 12px 11px 38px;
  border: 1.5px solid #E5DDD8; border-radius: 10px;
  font-size: 14px; color: var(--text); background: #FAFAFA;
  outline: none; transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
.iw input:focus { border-color: var(--or); box-shadow: 0 0 0 3px rgba(232,97,10,.10); background: #fff; }
.iw input::placeholder { color: var(--text3); }
.iw input.err { border-color: var(--red); }
.eye-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 4px 7px; font-size: 11px; font-weight: 500; color: var(--text3); border-radius: 4px; transition: background .15s, color .15s; }
.eye-toggle:hover { background: var(--or-light); color: var(--or); }
.ferr { display: none; align-items: center; gap: 4px; font-size: 12px; color: var(--red); margin-top: 5px; }
.ferr svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.forgot-row { display: flex; justify-content: flex-end; margin-top: -8px; margin-bottom: 20px; }
.forgot-row a { font-size: 13px; color: var(--or); cursor: pointer; }
.forgot-row a:hover { text-decoration: underline; }

.btn-signin {
  width: 100%; padding: 13px 16px; margin-top: 6px;
  background: linear-gradient(135deg, var(--or), var(--or-dark));
  color: #fff; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .15s, transform .1s;
  box-shadow: 0 4px 16px rgba(232,97,10,0.35);
  letter-spacing: .01em;
}
.btn-signin:hover { opacity: .92; transform: translateY(-1px); }
.btn-signin:active { transform: scale(.98); }
.btn-signin:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.spin { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: sp .65s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }

.divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 4px; color: var(--text3); font-size: 11px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: rgba(0,0,0,0.08); }

.footer-note { text-align: center; font-size: 11px; color: #C4A898; margin-top: 20px; line-height: 1.6; }

/* forgot/otp/reset */
.back-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--or); cursor: pointer; background: none; border: none; padding: 0; margin-bottom: 22px; }
.back-btn:hover { text-decoration: underline; }
.back-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.otp-row { display: flex; gap: 8px; justify-content: center; margin: 8px 0 6px; }
.otp-row input { width: 46px; height: 50px; text-align: center; font-size: 20px; font-weight: 600; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text); outline: none; }
.otp-row input:focus { border-color: var(--or); box-shadow: 0 0 0 3px rgba(232,97,10,.1); }
.otp-row input.filled { border-color: var(--or); background: var(--or-light); }
.resend-row { font-size: 13px; color: var(--text2); text-align: center; margin: 12px 0 20px; }
.resend-row a { color: var(--or); cursor: pointer; }
.resend-row a.disabled { pointer-events: none; opacity: .4; }
.strength-bar { height: 4px; border-radius: 2px; background: #e0e0e0; margin-top: 7px; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 2px; transition: width .3s, background .3s; width: 0; }
.strength-lbl { font-size: 11px; margin-top: 4px; }
.success-wrap { text-align: center; padding: 8px 0; }
.success-circle { width: 60px; height: 60px; background: var(--green-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.success-circle svg { width: 30px; height: 30px; stroke: var(--green); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* IMAGE COUNT BADGE */
.img-badge {
  position: absolute; top: 22px; right: 24px; z-index: 10;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px); border-radius: 20px;
  padding: 4px 12px; font-size: 11px; color: rgba(255,255,255,0.7);
  display: flex; align-items: center; gap: 5px;
}
.img-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green-mid); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* LIGHTBOX (mosaic/strip preview — not in the original prototype, added
   on request; kept page-specific rather than the shared lightbox
   component since this page links no other shared components either). */
.lb-bd {
  display: none; position: fixed; inset: 0; z-index: 700;
  background: rgba(6,10,16,.94);
  align-items: center; justify-content: center; flex-direction: column;
}
.lb-bd.open { display: flex; }
.lb-media { max-width: 88vw; max-height: 80vh; border-radius: 12px; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-close {
  position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: none; cursor: pointer; color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.lb-close:hover { background: rgba(255,255,255,.2); }
.lb-close svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-nav svg { width: 20px; height: 20px; }
.lb-counter {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: rgba(255,255,255,.5); background: rgba(0,0,0,.4); padding: 3px 12px; border-radius: 20px;
}
