/* ==================================================================
   YoPOS sign-in pages (login, sign-up, forgot / reset password).
   A shop photo slideshow behind a dark overlay, with a frosted-glass
   card. Brand teal + gold. Pages fit one screen where the form allows.
   ================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700&family=Barlow:wght@400;500;600&display=swap');

:root {
    --yp-teal: #12a594;
    --yp-teal-ink: #0d7a6e;
    --yp-deep: #0b4a45;
    --yp-gold: #f2b632;
    --yp-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --yp-body: 'Barlow', system-ui, sans-serif;
}

html, body { min-height: 100%; }
body {
    margin: 0;
    font-family: var(--yp-body) !important;
    background: #0d1b1a !important;
    color: #fff;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Background: slideshow of shop photos ---------- */
.auth-bg-slideshow { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: #0d1b1a; }
.auth-bg-slideshow .slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; animation: yp-slideshow 24s infinite; }
.auth-bg-slideshow .slide:nth-child(1) { animation-delay: 0s;  background-image: url('https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?w=1920&q=80'); }
.auth-bg-slideshow .slide:nth-child(2) { animation-delay: 6s;  background-image: url('https://images.unsplash.com/photo-1556742111-a301076d9d18?w=1920&q=80'); }
.auth-bg-slideshow .slide:nth-child(3) { animation-delay: 12s; background-image: url('https://images.unsplash.com/photo-1441986300917-64674bd600d8?w=1920&q=80'); }
.auth-bg-slideshow .slide:nth-child(4) { animation-delay: 18s; background-image: url('https://images.unsplash.com/photo-1556740758-90de374c12ad?w=1920&q=80'); }
@keyframes yp-slideshow {
    0% { opacity: 0; transform: scale(1); }
    5% { opacity: 1; }
    25% { opacity: 1; }
    30% { opacity: 0; transform: scale(1.08); }
    100% { opacity: 0; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .auth-bg-slideshow .slide { animation: none; }
    .auth-bg-slideshow .slide:nth-child(1) { opacity: 1; }
}

/* Dark overlay with a hint of brand teal, for readability */
.auth-overlay { position: fixed; inset: 0; z-index: -1; background: linear-gradient(135deg, rgba(4, 26, 24, .82) 0%, rgba(0, 0, 0, .55) 100%); }

/* ---------- Layout ---------- */
.auth-page-wrapper {
    min-height: 100vh; min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 1;
    padding: 1.25rem 1rem;
    background: transparent !important;
}

/* ---------- Frosted-glass card ---------- */
.auth-card {
    background: rgba(255, 255, 255, .13) !important;
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, .22) !important;
    border-radius: 22px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .5) !important;
    overflow: hidden;
    width: 100%;
    max-width: var(--auth-card-w, 430px);
    color: #fff;
}
.auth-card .card-body { padding: clamp(1.4rem, 4vh, 2.3rem) clamp(1.3rem, 4vw, 2.3rem) !important; }

.auth-logo { text-align: center; margin-bottom: clamp(.8rem, 2.4vh, 1.4rem); }
.auth-logo img { height: clamp(44px, 7vh, 58px); width: auto; display: inline-block; }
.auth-logo p { color: rgba(255, 255, 255, .78); font-size: .88rem; font-weight: 500; margin: .2rem 0 0; }

.auth-title { font-family: var(--yp-display) !important; font-weight: 700 !important; font-size: clamp(1.9rem, 4.6vh, 2.4rem) !important; line-height: 1; color: #fff !important; text-align: center; margin: 0 0 .35rem !important; letter-spacing: .01em; }
.auth-subtitle { color: rgba(255, 255, 255, .78) !important; text-align: center; margin: 0 0 clamp(1rem, 2.6vh, 1.5rem) !important; font-size: .98rem; }

/* ---------- Form controls ---------- */
.auth-card .form-label, .auth-card label { color: rgba(255, 255, 255, .92); font-weight: 600; margin-bottom: .4rem; font-size: .95rem; }
.auth-card .form-control, .auth-card .form-select, .auth-card .yp-input {
    background-color: rgba(255, 255, 255, .1) !important;
    border: 1px solid rgba(255, 255, 255, .25) !important;
    color: #fff !important;
    padding: .78rem 1rem;
    border-radius: 12px !important;
    font-size: 1rem;
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}
.auth-card .form-select option { color: #132423; }
.auth-card .form-control::placeholder, .auth-card .yp-input::placeholder { color: rgba(255, 255, 255, .55) !important; }
.auth-card .form-control:focus, .auth-card .form-select:focus, .auth-card .yp-input:focus {
    background-color: rgba(255, 255, 255, .16) !important;
    border-color: var(--yp-gold) !important;
    box-shadow: 0 0 0 4px rgba(242, 182, 50, .18) !important;
    outline: none;
    color: #fff !important;
    -webkit-text-fill-color: #fff;
}
/* Autofilled fields keep the glass look */
.auth-card input:-webkit-autofill,
.auth-card input:-webkit-autofill:hover,
.auth-card input:-webkit-autofill:focus,
.auth-card input:-webkit-autofill:active,
.auth-card input:autofill {
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px #1c4541 inset !important;
    box-shadow: 0 0 0 1000px #1c4541 inset !important;
    /* Chrome paints its own light autofill colour; delay it indefinitely */
    transition: background-color 600000s 0s, color 600000s 0s !important;
}
.auth-card input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px #1c4541 inset, 0 0 0 4px rgba(242,182,50,.18) !important; }
.auth-card .form-check-input { background-color: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .4); }
.auth-card .form-check-input:checked { background-color: var(--yp-teal); border-color: var(--yp-teal); }
.auth-card .form-check-label { color: rgba(255, 255, 255, .88); }

/* ---------- Links & buttons ---------- */
.auth-card a { color: #ffd77a; text-decoration: none; transition: color .2s; }
.auth-card a:hover { color: #fff; text-decoration: underline; }

.btn-auth {
    background: var(--yp-teal-ink) !important;
    border: none !important;
    color: #fff !important;
    padding: .9rem 2rem;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 1.02rem !important;
    box-shadow: 0 6px 18px rgba(13, 122, 110, .45) !important;
    transition: background-color .2s, transform .2s, box-shadow .2s;
}
.btn-auth:hover { background: var(--yp-teal) !important; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(13, 122, 110, .5) !important; }
.btn-auth:disabled { opacity: .85; transform: none; }
.auth-card .btn-outline-light { border-radius: 12px; }

/* ---------- Messages ---------- */
.auth-card .alert { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); color: #fff; border-radius: 12px; }
.auth-card .alert-danger { background: rgba(220, 53, 69, .26); border-color: rgba(255, 120, 130, .4); }
.auth-card .alert-success { background: rgba(25, 135, 84, .26); border-color: rgba(120, 220, 170, .4); }
.auth-card .invalid-feedback, .auth-card .yp-err { color: #ffb4b4; font-size: .88rem; margin-top: .3rem; display: block; }
.auth-card .is-invalid, .auth-card .yp-input.bad { border-color: #ff8a8a !important; }

/* ---------- Footer ---------- */
.auth-footer { text-align: center; margin-top: clamp(.9rem, 2.4vh, 1.4rem); color: rgba(255, 255, 255, .62); font-size: .86rem; }
.auth-footer p { margin: 0; }

:focus-visible { outline: 3px solid var(--yp-gold); outline-offset: 2px; }

@media (max-width: 576px) {
    .auth-card { border-radius: 18px !important; }
}

/* Native dropdown lists render on the OS surface: keep them readable */
select option, select optgroup { color: #132423; background: #fff; }
