/* ═══════════════════════════════════
   ROOT & BASE (Sliding Overlay Split Theme)
   ═══════════════════════════════════ */
:root {
    --primary:  #9333ea; /* Vibrant Storefront Theme Purple */
    --primary-hover: #7e22ce;
    --magenta-pink: #c026d3;
    --grey-btn: #475569; /* Sleek Slate Grey */
    --grey-btn-hover: #334155;
    --green:    #16a34a;
    --red:      #ef4444;
    --muted:    #475569;
    --font:     'Outfit', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* Natural Ambient Botanical Theme with Earth & Forest Green tones */
body {
    font-family: var(--font);
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(16, 185, 129, 0.28) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(20, 83, 45, 0.45) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 10%, rgba(132, 204, 22, 0.15) 0%, transparent 40%),
        url('/supermarket-bg.jpg') center/cover no-repeat fixed,
        linear-gradient(135deg, #022c22 0%, #064e3b 40%, #065f46 70%, #022c22 100%);
    background-blend-mode: screen, normal, screen, overlay, normal;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

/* Natural soft bokeh light blobs */
body::before {
    content: '';
    position: fixed;
    top: -150px;
    left: -150px;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.22) 0%, rgba(16, 185, 129, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -150px;
    right: -150px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(5, 46, 22, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

/* Fullscreen background video layer */
.bg-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bg-video-container video,
#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bg-video-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(2, 44, 34, 0.4) 0%, rgba(2, 44, 34, 0.75) 100%);
    backdrop-filter: blur(4px);
}

/* ═══════════════════════════════════
   PERFECTLY CENTERED FLOATING GLASS CARD
   ═══════════════════════════════════ */
.login-container {
    display: flex;
    width: 850px;
    height: 540px;
    max-width: 92vw;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), 0 0 45px rgba(192, 38, 211, 0.35);
    position: relative;
    z-index: 10;
    overflow: hidden;
    margin: auto;
}

/* ─── Form Slots (Left: Login, Right: Register) ─── */
.form-slot {
    width: 50%;
    height: 100%;
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.2rem 2.8rem;
    background: #ffffff;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.login-slot { left: 0; }
.register-slot { left: 50%; }

.form-header {
    margin-bottom: 1.2rem;
}

.greet-sub {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.greet-title {
    font-size: 2.3rem;
    font-weight: 900;
    color: #0f172a;
    margin: 0.15rem 0 0 0;
    letter-spacing: -0.03em;
}

/* ═══════════════════════════════════
   SLIDING OVERLAY PANEL (STOREFRONT THEME GRADIENT)
   ═══════════════════════════════════ */
.auth-overlay-panel {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    z-index: 10;
    background: linear-gradient(135deg, #c026d3 0%, #7e22ce 50%, #1e1b4b 100%);
    color: #ffffff;
    overflow: hidden;
    will-change: transform;
    transition: transform 0.65s cubic-bezier(0.65, 0, 0.35, 1);
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.4);
}

.login-container.is-register .auth-overlay-panel {
    transform: translateX(-100%);
}

.vector-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.vector-bg svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Floating Spheres */
.sphere-1, .sphere-2, .sphere-3 {
    will-change: transform;
    transform-origin: center;
}
.sphere-1 { animation: floatSphere1 3.5s ease-in-out infinite alternate; }
.sphere-2 { animation: floatSphere2 4.5s ease-in-out infinite alternate; }
.sphere-3 { animation: floatSphere3 3s ease-in-out infinite alternate; }

@keyframes floatSphere1 { 0% { transform: translate3d(0px, 0px, 0px); } 100% { transform: translate3d(18px, -22px, 0px); } }
@keyframes floatSphere2 { 0% { transform: translate3d(0px, 0px, 0px); } 100% { transform: translate3d(-22px, 18px, 0px); } }
@keyframes floatSphere3 { 0% { transform: translate3d(0px, 0px, 0px); } 100% { transform: translate3d(14px, 14px, 0px); } }

.overlay-inner-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.2rem;
    text-align: center;
}

.logo-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    margin-bottom: 0.8rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.logo-ring img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.brand-title {
    font-size: 1.85rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.brand-subtitle {
    font-size: 0.72rem;
    font-weight: 700;
    color: #f5d0fe;
    letter-spacing: 0.14em;
    margin-top: 0.2rem;
    margin-bottom: 1.4rem;
    text-transform: uppercase;
}

.overlay-card-view {
    transition: opacity 0.4s ease, transform 0.4s ease;
    width: 100%;
}

.overlay-heading {
    font-size: 1.55rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.overlay-desc {
    font-size: 0.92rem;
    color: #f8fafc;
    line-height: 1.45;
    margin-bottom: 1.4rem;
    padding: 0 0.5rem;
    font-weight: 500;
}

.btn-overlay-toggle {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #ffffff;
    border-radius: 30px;
    color: #ffffff;
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.25s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.btn-overlay-toggle:hover {
    background: #ffffff;
    color: #7e22ce;
    border-color: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.overlay-view-login { opacity: 1; transform: scale(1); pointer-events: auto; }
.overlay-view-register { opacity: 0; transform: scale(0.92); pointer-events: none; position: absolute; }
.login-container.is-register .overlay-view-login { opacity: 0; transform: scale(0.92); pointer-events: none; position: absolute; }
.login-container.is-register .overlay-view-register { opacity: 1; transform: scale(1); pointer-events: auto; position: relative; }

.greet-desc { font-size: 0.85rem; color: #64748b; margin-top: 0.2rem; font-weight: 500; }

.reg-scrollable {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 0.4rem;
}
.reg-scrollable::-webkit-scrollbar { width: 5px; }
.reg-scrollable::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.price-badge-row {
    margin-top: -0.3rem;
    margin-bottom: 0.8rem;
}
.price-badge {
    display: inline-block;
    background: #fdf4ff;
    border: 1px solid #f0abfc;
    color: #a21caf;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
}

.field-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1rem;
    padding-right: 2rem !important;
}

.slug-wrap {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1.8px solid #cbd5e1;
    border-radius: 12px;
    padding: 0 0.8rem;
    transition: all 0.2s ease-in-out;
}
.slug-wrap:focus-within {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3.5px rgba(147, 51, 234, 0.15);
}
.slug-prefix {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
    user-select: none;
}
.field-slug {
    border: none !important;
    background: transparent !important;
    padding-left: 0.3rem !important;
    box-shadow: none !important;
}
.field-hint {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* ═══════════════════════════════════
   FORM FIELDS & READABLE INPUTS
   ═══════════════════════════════════ */
.field-group { margin-bottom: 0.75rem; }
.field-label { display: block; font-size: 0.76rem; font-weight: 800; color: #334155; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.field-wrap { position: relative; display: flex; align-items: center; width: 100%; }
.field-icon { 
    position: absolute; 
    left: 0.95rem; 
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.05rem; 
    color: #64748b; 
    pointer-events: none; 
    line-height: 1;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.field-input {
    width: 100%;
    background: #f8fafc;
    border: 1.8px solid #cbd5e1;
    border-radius: 12px;
    padding: 0.75rem 2.5rem 0.75rem 2.8rem;
    color: #0f172a;
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease-in-out;
}
.field-input::placeholder { color: #94a3b8; font-weight: 400; }
.field-input:focus { border-color: var(--primary); background: #ffffff; box-shadow: 0 0 0 3.5px rgba(147, 51, 234, 0.15); }
.field-icon-r { 
    position: absolute; 
    right: 0.9rem; 
    top: 50%;
    transform: translateY(-50%);
    background: none; 
    border: none; 
    color: #64748b; 
    cursor: pointer; 
    font-size: 1rem; 
    line-height: 1;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.field-wrap.error .field-input { border-color: var(--red); background: #fef2f2; }

.form-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.remember-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; font-weight: 600; color: #334155; cursor: pointer; }
.remember-label input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.forgot-link { font-size: 0.88rem; color: var(--primary); text-decoration: none; font-weight: 700; }

.btn-authorize {
    width: 100%;
    padding: 0.88rem;
    background: var(--grey-btn);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 5px 15px rgba(71, 85, 105, 0.2);
}
.btn-authorize:hover { background: var(--grey-btn-hover); box-shadow: 0 8px 20px rgba(51, 65, 85, 0.3); }
.btn-register { background: linear-gradient(135deg, #c026d3, #9333ea); box-shadow: 0 5px 15px rgba(192, 38, 211, 0.3); }
.btn-register:hover { background: linear-gradient(135deg, #a21caf, #7e22ce); }
.btn-authorize:disabled { opacity: 0.6; cursor: not-allowed; }

.mobile-switch-note { display: none; text-align: center; margin-top: 0.9rem; font-size: 0.88rem; color: #475569; }
.mobile-switch-note a { color: var(--primary); font-weight: 800; text-decoration: none; }

.whatsapp-support {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    padding: 0.55rem 1rem;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 10px;
    text-decoration: none;
    color: var(--green);
    font-size: 0.85rem;
    font-weight: 800;
}
.whatsapp-icon { width: 18px; height: 18px; }
.wa-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; animation: statusPulse 2s infinite; }
@keyframes statusPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.error-msg { background: #fef2f2; border: 1.5px solid #fca5a5; border-radius: 10px; padding: 0.6rem 1rem; font-size: 0.85rem; color: var(--red); font-weight: 700; margin-bottom: 0.8rem; display: none; }
.error-msg.show { display: block; animation: shake 0.4s ease; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.success-overlay { position: absolute; inset: 0; background: #ffffff; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease-in-out; z-index: 60; text-align: center; padding: 2.5rem; }
.success-overlay.show { opacity: 1; pointer-events: auto; }
.success-check { width: 70px; height: 70px; background: #ecfdf5; border: 2px solid var(--green); color: var(--green); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 1rem; }
.success-name { font-size: 1.35rem; font-weight: 900; color: #0f172a; margin-bottom: 0.3rem; }
.success-role { font-size: 0.88rem; color: var(--muted); }
.success-store { font-size: 0.88rem; color: var(--primary); font-weight: 800; }
.redirect-bar { width: 100%; height: 4px; background: #f1f5f9; border-radius: 2px; margin-top: 1.4rem; overflow: hidden; }
.redirect-fill { height: 100%; background: var(--primary); border-radius: 2px; animation: fillBar 2s linear both; }
@keyframes fillBar { from { width: 0%; } to { width: 100%; } }
.redirect-txt { font-size: 0.78rem; color: #64748b; margin-top: 0.4rem; font-weight: 600; }

.win-controls { position: absolute; top: 1rem; right: 1rem; display: none; gap: 0.4rem; z-index: 50; align-items: center; }
.win-controls.visible { display: flex; }
.win-btn { width: 12px; height: 12px; border-radius: 50%; border: none; cursor: pointer; position: relative; }
.win-btn.close { background: #ff5f57; }
.win-btn.minimize { background: #febc2e; }

/* Mobile Responsive Floating Card */
@media (max-width: 768px) {
    .login-container {
        width: 92vw;
        height: auto;
        min-height: 520px;
        border-radius: 20px;
        flex-direction: column;
    }
    .auth-overlay-panel { display: none; }
    .form-slot { width: 100%; left: 0 !important; position: relative; padding: 2rem 1.5rem; }
    .register-slot { display: none; }
    .login-container.is-register .login-slot { display: none; }
    .login-container.is-register .register-slot { display: flex; }
    .mobile-switch-note { display: block; }
    .win-controls { display: none !important; }
}
