/* =============================================
   Store Prompt — KarobarSystems
   Used on: /login (when no store is selected)
   Design system: see memory/design_system.md
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #6366f1;
    --accent: #06b6d4;
    --gradient: linear-gradient(135deg, #6366f1, #06b6d4);
}

body {
    min-height: 100vh;
    font-family: 'Inter', system-ui, sans-serif;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

/* ---- Floating dots background ---- */
.bg-dots {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: floatDot 14s ease-in-out infinite;
}

.dot-1  { width: 8px;  height: 8px;  background: var(--primary); top: 12%; left: 10%;  animation-delay: 0s; }
.dot-2  { width: 10px; height: 10px; background: var(--accent);  top: 22%; right: 12%; animation-delay: -3s;  animation-duration: 16s; }
.dot-3  { width: 6px;  height: 6px;  background: #818cf8;        top: 50%; left: 6%;   animation-delay: -6s;  animation-duration: 18s; }
.dot-4  { width: 9px;  height: 9px;  background: var(--accent);  top: 60%; right: 8%;  animation-delay: -9s; }
.dot-5  { width: 5px;  height: 5px;  background: var(--primary); top: 35%; left: 20%;  animation-delay: -4s;  animation-duration: 15s; }
.dot-6  { width: 7px;  height: 7px;  background: #22d3ee;        top: 45%; right: 20%; animation-delay: -7s;  animation-duration: 17s; }
.dot-7  { width: 6px;  height: 6px;  background: var(--primary); top: 8%;  right: 28%; animation-delay: -2s;  animation-duration: 20s; }
.dot-8  { width: 8px;  height: 8px;  background: var(--accent);  top: 75%; left: 18%;  animation-delay: -5s;  animation-duration: 13s; }
.dot-9  { width: 5px;  height: 5px;  background: #818cf8;        top: 80%; right: 25%; animation-delay: -10s; animation-duration: 19s; }
.dot-10 { width: 7px;  height: 7px;  background: #22d3ee;        top: 30%; left: 35%;  animation-delay: -8s;  animation-duration: 16s; }

/* Subtle radial glow behind card */
body::before {
    content: '';
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(99,102,241,0.06) 0%, rgba(6,182,212,0.04) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ---- Card ---- */
.card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 40px 32px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06), 0 24px 60px rgba(0,0,0,0.08);
    animation: rise 0.45s cubic-bezier(0.16,1,0.3,1) both;
}

/* ---- Brand ---- */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.brand-logo {
    width: 44px; height: 44px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99,102,241,0.25);
    position: relative;
    overflow: hidden;
}

.brand-logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15));
}

.brand-logo svg {
    display: block;
    position: relative;
    z-index: 1;
}

.brand-text { line-height: 1.1; }

.brand-name {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
}

.brand-name span { color: var(--primary); }

.brand-tagline {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ---- Heading ---- */
.heading {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.4px;
    margin-bottom: 6px;
}

.sub {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* ---- Error message ---- */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #b91c1c;
    line-height: 1.45;
}

/* ---- Input field ---- */
.field { position: relative; margin-bottom: 14px; }

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.field input {
    width: 100%;
    padding: 13px 14px 13px 42px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.field input::placeholder { color: #94a3b8; }

.field input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.field input.shake {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
    animation: shake 0.35s ease;
}

/* ---- Submit button ---- */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--gradient);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
    box-shadow: 0 4px 14px rgba(99,102,241,0.3);
    margin-top: 4px;
    letter-spacing: -0.1px;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.4);
    filter: brightness(1.05);
}

.btn-submit:active:not(:disabled) { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.65; cursor: not-allowed; }

.spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-submit.loading .btn-label { display: none; }
.btn-submit.loading .spinner { display: block; }

/* ---- Hint ---- */
.hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 12px;
    line-height: 1.4;
}

/* ---- Divider ---- */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 20px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}

/* ---- WhatsApp link ---- */
.wa-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 16px;
    border: 1.5px solid #d1fae5;
    border-radius: 10px;
    background: #f0fdf4;
    color: #16a34a;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.18s, border-color 0.18s;
}

.wa-link:hover {
    background: #dcfce7;
    border-color: #bbf7d0;
}

/* ---- Footer ---- */
.footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
}

/* ---- Keyframes ---- */
@keyframes floatDot {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(20px, -25px) scale(1.1); }
    50%      { transform: translate(-15px, 20px) scale(0.9); }
    75%      { transform: translate(25px, 12px) scale(1.05); }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    body {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .card {
        padding: 28px 24px 24px;
        border-radius: 16px;
    }
}
