/*
 * ============================================================
 *  Passion Login Page — Stylesheet
 *  File:    assets/css/login.css
 *  Loaded:  passion-login/index.php
 * ============================================================
 *
 *  Colour palette
 *    Primary / passion-blue : #007bff
 *    Accent  / passion-gold : #ffc107
 *    Error                  : #ef4444 / #dc2626
 *
 *  Sections
 *    1. Base background (light mesh gradient + noise overlay)
 *    2. Animations (heartbeat, blinker, heart-dots loader, fadeInDown)
 *    3. UI components (error box, theme toggle button)
 *    4. Dark mode — all overrides grouped here
 *    5. Responsive breakpoints
 * ============================================================ */


/* ============================================================
   1. BASE BACKGROUND
   ============================================================ */

body {
    background-color: #f0f4ff;
    /* fallback before gradient paints */
}

/* Full-viewport gradient mesh — white · blue · gold */
.passion-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(0, 123, 255, 0.30) 0%, transparent 55%),
        radial-gradient(ellipse at 100% 0%, rgba(255, 193, 7, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.80) 0%, transparent 60%),
        radial-gradient(ellipse at 0% 100%, rgba(255, 193, 7, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 100% 100%, rgba(0, 123, 255, 0.22) 0%, transparent 55%),
        linear-gradient(135deg, #e8f0ff 0%, #fff9e6 50%, #e8f4ff 100%);
}

/* SVG noise overlay — adds tactile texture without another file */
.passion-noise {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: cover;
    mix-blend-mode: multiply;
}


/* ============================================================
   2. ANIMATIONS
   ============================================================ */

/* Heartbeat — used on the brand heart icons */
@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.15);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.10);
    }

    70% {
        transform: scale(1);
    }
}

.heart-pulse {
    animation: heartbeat 2.4s ease-in-out infinite;
    display: inline-block;
}

/* Blink — used on system-note text */
.blink_me {
    animation: blinker 3s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0.3;
    }
}

/* Heart-dots loader — 3 hearts that bounce in sequence during sign-in */
.heart-loader {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    vertical-align: middle;
}

.heart-loader span {
    display: inline-block;
    font-size: 12px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.9);
    animation: heartBounce 0.9s ease-in-out infinite;
}

.heart-loader span:nth-child(2) {
    animation-delay: 0.18s;
}

.heart-loader span:nth-child(3) {
    animation-delay: 0.36s;
}

@keyframes heartBounce {

    0%,
    80%,
    100% {
        transform: scale(0.7) translateY(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2) translateY(-4px);
        opacity: 1;
    }
}

/* FadeInDown — used when the inline error box appears */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   3. UI COMPONENTS
   ============================================================ */

/* Inline error box — shown above the form inputs on bad login */
#signin-error {
    display: none;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #dc2626;
    font-size: 0.82rem;
    line-height: 1.6;
    animation: fadeInDown 0.3s ease;
}

/* Sun / moon theme-toggle button in the header */
.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1.5px solid rgba(0, 123, 255, 0.25);
    background: rgba(0, 123, 255, 0.10);
    cursor: pointer;
    color: #007bff;
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

.theme-btn:hover {
    background: rgba(0, 123, 255, 0.20);
}


/* ============================================================
   4. DARK MODE  (applied when <html class="dark">)
   ============================================================ */

/* Page body background */
.dark body {
    background-color: #0a0f1e;
    color: #f1f5f9;
}

/* Dark gradient mesh */
.dark .passion-bg {
    background:
        radial-gradient(ellipse at 0% 0%, rgba(0, 90, 200, 0.30) 0%, transparent 55%),
        radial-gradient(ellipse at 100% 0%, rgba(160, 110, 0, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 50%, rgba(8, 14, 32, 0.92) 0%, transparent 60%),
        radial-gradient(ellipse at 0% 100%, rgba(160, 110, 0, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 100% 100%, rgba(0, 80, 180, 0.20) 0%, transparent 55%),
        linear-gradient(135deg, #080e1e 0%, #110e06 50%, #080d1c 100%);
}

/* Dark glassmorphism card */
.dark .glass-card {
    background: rgba(12, 20, 42, 0.82) !important;
    border-color: rgba(0, 123, 255, 0.22) !important;
    box-shadow: 0 8px 40px rgba(0, 70, 180, 0.22), 0 2px 12px rgba(160, 110, 0, 0.10) !important;
}

/* Dark input fields — uses ID selectors to override Tailwind inline styles */
.dark #username,
.dark #passcode {
    background: rgba(14, 22, 52, 0.88) !important;
    color: #e2e8f0 !important;
    border-color: #2d3a55 !important;
    caret-color: #5ba4ff;
}

.dark #username::placeholder,
.dark #passcode::placeholder {
    color: #4a5568 !important;
}

/* Dark text utility classes */
.dark .login-label {
    color: #cbd5e1 !important;
}

.dark .login-subtitle {
    color: #64748b !important;
}

.dark .login-brand {
    color: #f8fafc !important;
}

.dark .login-remember {
    color: #94a3b8 !important;
}

.dark .login-footer {
    color: #475569 !important;
}

.dark .login-divider {
    background: #2d3a55 !important;
}

.dark label span.text-xs {
    color: #94a3b8 !important;
}

/* Dark inline error box */
.dark #signin-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

/* Dark fingerprint / biometric button (disabled stub) */
.dark .biometric-btn {
    background: rgba(18, 28, 55, 0.8) !important;
    border-color: #2d3a55 !important;
    color: #4a5568 !important;
}

/* Dark theme-toggle button */
.dark .theme-btn {
    background: rgba(0, 123, 255, 0.18);
    border-color: rgba(0, 123, 255, 0.35);
    color: #5ba4ff;
}


/* ============================================================
   5. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Mobile (≤ 480px): hide "New Business?" label, keep "Register →" */
@media (max-width: 480px) {
    .new-biz-prefix {
        display: none;
    }
}