/* ========== NestSync — Premium Styles ========== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&display=swap');

:root {
    --fm-primary: #4361ee;
    --fm-primary-dark: #3a0ca3;
    --fm-primary-light: #7b8ff7;
    --fm-primary-glow: rgba(67, 97, 238, 0.12);
    --fm-secondary: #7209b7;
    --fm-secondary-light: #b185db;
    --fm-accent: #f72585;
    --fm-accent-light: #ff6bab;
    --fm-warm: #ff6b35;
    --fm-warm-light: #ff9f76;
    --fm-teal: #4cc9f0;
    --fm-teal-dark: #3a86a8;
    --fm-success: #06d6a0;
    --fm-success-light: #38e8b0;
    --fm-warning: #fbb02d;
    --fm-danger: #ef476f;
    --fm-bg: #fafbff;
    --fm-bg-alt: #f0f4ff;
    --fm-bg-warm: #fffbf7;
    --fm-card: #ffffff;
    --fm-text: #1a1a2e;
    --fm-text-secondary: #3d3d5c;
    --fm-muted: #6b7280;
    --fm-border: #e5e7eb;
    --fm-border-light: #f3f4f6;
    --fm-radius: 16px;
    --fm-radius-sm: 10px;
    --fm-radius-lg: 24px;
    --fm-radius-xl: 32px;
    --fm-shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --fm-shadow: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
    --fm-shadow-md: 0 10px 30px -5px rgba(67,97,238,0.10), 0 8px 10px -6px rgba(0,0,0,0.03);
    --fm-shadow-lg: 0 20px 50px -12px rgba(67,97,238,0.15), 0 8px 20px -8px rgba(0,0,0,0.05);
    --fm-shadow-glow: 0 0 40px rgba(67,97,238,0.15);
    --fm-shadow-warm: 0 10px 30px -5px rgba(247,37,133,0.10);
    --fm-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --fm-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --fm-transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--fm-text);
    background: var(--fm-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
    line-height: 1.65;
}

/* ========== NAVBAR ========== */
.fm-navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    transition: var(--fm-transition);
    padding: 0.65rem 0;
}
.fm-navbar.scrolled {
    box-shadow: 0 2px 20px rgba(67,97,238,0.06);
}
.fm-navbar .navbar-brand {
    color: var(--fm-primary);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: var(--fm-transition-fast);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.fm-navbar .navbar-brand:hover {
    color: var(--fm-primary-dark);
    transform: scale(1.02);
}
.fm-navbar .navbar-brand i {
    background: linear-gradient(135deg, var(--fm-accent), var(--fm-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
}
.fm-navbar .nav-link {
    color: var(--fm-text-secondary);
    font-weight: 500;
    font-size: 0.925rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--fm-radius-sm);
    transition: var(--fm-transition-fast);
    position: relative;
}
.fm-navbar .nav-link:hover {
    color: var(--fm-primary);
    background: var(--fm-primary-glow);
}
.fm-navbar .dropdown-menu {
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    box-shadow: var(--fm-shadow-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
    animation: dropdownFade 0.2s ease;
}
.fm-navbar .dropdown-item {
    border-radius: var(--fm-radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: var(--fm-transition-fast);
}
.fm-navbar .dropdown-item:hover {
    background: var(--fm-bg-alt);
    color: var(--fm-primary);
}
@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== HERO ========== */
.fm-hero {
    background: linear-gradient(135deg, #3a0ca3 0%, var(--fm-primary) 30%, var(--fm-accent) 60%, #ff6b35 85%, #fbb02d 100%);
    background-size: 300% 300%;
    animation: heroGradient 15s ease infinite;
    position: relative;
    overflow: hidden;
}
.fm-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.12) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.08) 0%, transparent 40%);
    pointer-events: none;
}
.fm-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--fm-bg), transparent);
    pointer-events: none;
}
.fm-hero .container {
    position: relative;
    z-index: 1;
}
@keyframes heroGradient {
    0% { background-position: 0% 50%; }
    33% { background-position: 50% 100%; }
    66% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.fm-hero h1 {
    letter-spacing: -0.04em;
    text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.fm-hero .lead {
    font-weight: 400;
    opacity: 0.92;
    line-height: 1.7;
}

/* Hero floating shapes */
.fm-hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.fm-hero-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    animation: floatShape 20s ease-in-out infinite;
}
.fm-hero-shape:nth-child(1) { width: 300px; height: 300px; top: -80px; right: -60px; animation-delay: 0s; }
.fm-hero-shape:nth-child(2) { width: 200px; height: 200px; bottom: -40px; left: 10%; animation-delay: -5s; }
.fm-hero-shape:nth-child(3) { width: 150px; height: 150px; top: 30%; left: -30px; animation-delay: -10s; }
.fm-hero-shape:nth-child(4) { width: 100px; height: 100px; top: 20%; right: 20%; animation-delay: -3s; animation-duration: 15s; }
@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -30px) rotate(5deg); }
    50% { transform: translate(-10px, 15px) rotate(-3deg); }
    75% { transform: translate(15px, 10px) rotate(4deg); }
}

/* ========== FEATURE CARDS ========== */
.fm-feature-card {
    transition: transform var(--fm-transition), box-shadow var(--fm-transition);
    border-radius: var(--fm-radius);
    border: 1px solid var(--fm-border-light) !important;
    overflow: hidden;
    position: relative;
}
.fm-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--fm-primary), var(--fm-accent));
    opacity: 0;
    transition: opacity var(--fm-transition);
}
.fm-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--fm-shadow-lg) !important;
}
.fm-feature-card:hover::before {
    opacity: 1;
}
.fm-icon-wrap {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--fm-bg-alt);
    transition: var(--fm-transition);
    position: relative;
}
.fm-feature-card:hover .fm-icon-wrap {
    transform: scale(1.08);
    box-shadow: var(--fm-shadow);
}
.fm-icon-wrap.icon-primary { background: rgba(67,97,238,0.08); }
.fm-icon-wrap.icon-success { background: rgba(6,214,160,0.08); }
.fm-icon-wrap.icon-info { background: rgba(76,201,240,0.08); }
.fm-icon-wrap.icon-warning { background: rgba(251,176,45,0.08); }
.fm-icon-wrap.icon-danger { background: rgba(239,71,111,0.08); }
.fm-icon-wrap.icon-purple { background: rgba(114,9,183,0.08); }
.text-purple { color: var(--fm-secondary) !important; }

/* ========== STEP NUMBERS ========== */
.fm-step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fm-primary), var(--fm-secondary));
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(67,97,238,0.3);
    transition: var(--fm-transition);
}
.fm-step-number:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(67,97,238,0.4);
}

/* Connecting line between steps */
.fm-steps-row .col-md-4 { position: relative; }
.fm-steps-row .col-md-4:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 32px;
    right: -16px;
    width: 32px;
    height: 2px;
    background: linear-gradient(90deg, var(--fm-primary-light), transparent);
    display: none;
}
@media (min-width: 768px) {
    .fm-steps-row .col-md-4:not(:last-child)::after { display: block; }
}

/* ========== PRICING ========== */
.fm-pricing-popular {
    border: 2px solid var(--fm-primary) !important;
    position: relative;
    background: linear-gradient(180deg, rgba(67,97,238,0.03) 0%, var(--fm-bg-warm) 100%);
    transform: scale(1.03);
}
.fm-pricing-popular .badge {
    position: relative;
    top: -2px;
    animation: pulseBadge 2s ease-in-out infinite;
}
@keyframes pulseBadge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(247,37,133,0.3); }
    50% { box-shadow: 0 0 0 8px rgba(247,37,133,0); }
}

/* ========== FOOTER ========== */
.fm-footer {
    background: linear-gradient(180deg, var(--fm-bg) 0%, var(--fm-bg-warm) 50%, #eef2ff 100%);
    border-top: 1px solid var(--fm-border);
}
.fm-footer a {
    transition: var(--fm-transition-fast);
}
.fm-footer a:hover {
    color: var(--fm-primary) !important;
}

/* ========== SIDEBAR NAV ========== */
.fm-nav-link {
    color: var(--fm-muted);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.6rem 0.85rem;
    border-radius: var(--fm-radius-sm);
    transition: all var(--fm-transition-fast);
    position: relative;
    overflow: hidden;
}
.fm-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--fm-primary), var(--fm-secondary));
    border-radius: 0 3px 3px 0;
    transition: height var(--fm-transition-fast);
}
.fm-nav-link:hover {
    color: var(--fm-primary);
    background: var(--fm-primary-glow);
    padding-left: 1rem;
}
.fm-nav-link:hover::before {
    height: 60%;
}
.fm-nav-link.active {
    color: var(--fm-primary);
    background: linear-gradient(135deg, rgba(67,97,238,0.08), rgba(114,9,183,0.05));
    font-weight: 600;
    padding-left: 1rem;
}
.fm-nav-link.active::before {
    height: 70%;
}
.fm-nav-link i {
    transition: var(--fm-transition-fast);
    font-size: 1rem;
}
.fm-nav-link:hover i,
.fm-nav-link.active i {
    transform: scale(1.1);
}

/* ========== SIDEBAR RESPONSIVE ========== */
.fm-sidebar {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--fm-border-light);
}
@media (max-width: 991.98px) {
    .fm-sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        width: 280px;
        height: calc(100vh - 56px);
        z-index: 1040;
        transform: translateX(-100%);
        overflow-y: auto;
        box-shadow: var(--fm-shadow-lg);
    }
    .fm-sidebar.show {
        transform: translateX(0);
    }
}

/* ========== TABLES ========== */
.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fm-muted);
    font-weight: 600;
    border-bottom-width: 2px;
    border-color: var(--fm-border);
    padding: 0.85rem 0.75rem;
}
.table td {
    vertical-align: middle;
    font-size: 0.875rem;
    padding: 0.75rem;
    border-color: var(--fm-border-light);
    transition: background var(--fm-transition-fast);
}
.table tbody tr {
    transition: var(--fm-transition-fast);
}
.table-hover tbody tr:hover {
    background: var(--fm-primary-glow) !important;
}
.table-hover tbody tr:hover td {
    border-color: rgba(67,97,238,0.08);
}
.shopping-checked {
    opacity: 0.5;
    text-decoration: line-through;
}

/* ========== CARDS ========== */
.card {
    border-radius: var(--fm-radius);
    transition: var(--fm-transition);
    border: 1px solid var(--fm-border-light);
}
.card.shadow-sm {
    box-shadow: var(--fm-shadow-sm) !important;
}
.card:hover {
    box-shadow: var(--fm-shadow) !important;
}
.card-header {
    border-bottom: 1px solid var(--fm-border-light);
    font-size: 0.9rem;
}

/* ========== STAT CARDS (Dashboard Overview) ========== */
.fm-stat-card {
    background: var(--fm-card);
    border-radius: var(--fm-radius);
    transition: var(--fm-transition);
    position: relative;
    overflow: hidden;
}
.fm-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.fm-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fm-shadow-md) !important;
}
.fm-stat-card .fs-3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ========== SAVINGS GOALS ========== */
.fm-goal-progress {
    height: 10px;
    border-radius: 6px;
    background: var(--fm-bg-alt);
    overflow: hidden;
}
.fm-goal-progress .progress-bar {
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== BADGES ========== */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.35em 0.7em;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

/* ========== BUTTONS ========== */
.btn {
    font-weight: 500;
    border-radius: var(--fm-radius-sm);
    transition: all var(--fm-transition);
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: linear-gradient(135deg, var(--fm-primary), var(--fm-accent));
    border: none;
    box-shadow: 0 4px 14px rgba(67,97,238,0.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--fm-primary-dark), var(--fm-primary));
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(67,97,238,0.35);
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(67,97,238,0.25);
}
.btn-outline-primary {
    color: var(--fm-primary);
    border-color: var(--fm-primary);
    border-width: 1.5px;
}
.btn-outline-primary:hover {
    background: var(--fm-primary);
    border-color: var(--fm-primary);
    box-shadow: 0 4px 14px rgba(67,97,238,0.25);
    transform: translateY(-1px);
}
.btn-light {
    font-weight: 600;
}
.btn-light:hover {
    transform: translateY(-1px);
    box-shadow: var(--fm-shadow);
}
.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--fm-radius);
}
.btn-success {
    background: linear-gradient(135deg, var(--fm-success), #059669);
    border: none;
}
.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
}

/* ========== DELETE BUTTON ========== */
.btn-action-delete {
    color: var(--fm-muted);
    border: none;
    background: none;
    padding: 4px 8px;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--fm-transition-fast);
}
.btn-action-delete:hover {
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

/* ========== FORM CONTROLS ========== */
.form-control, .form-select {
    border-radius: var(--fm-radius-sm);
    border: 1.5px solid var(--fm-border);
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    transition: all var(--fm-transition-fast);
    background: var(--fm-card);
}
.form-control:focus, .form-select:focus {
    border-color: var(--fm-primary-light);
    box-shadow: 0 0 0 3px var(--fm-primary-glow);
}
.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--fm-text-secondary);
    margin-bottom: 0.35rem;
}

/* ========== ALERTS ========== */
.alert {
    border-radius: var(--fm-radius-sm);
    border: none;
    font-size: 0.875rem;
    backdrop-filter: blur(8px);
}

/* ========== AUTH PAGES ========== */
.fm-auth-wrapper {
    min-height: calc(100vh - 56px - 80px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--fm-bg) 0%, var(--fm-bg-warm) 50%, #eef2ff 100%);
    position: relative;
}
.fm-auth-wrapper::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 5%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(67,97,238,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.fm-auth-wrapper::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: 5%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247,37,133,0.05) 0%, transparent 70%);
    pointer-events: none;
}
.fm-auth-card {
    border-radius: var(--fm-radius-lg) !important;
    box-shadow: var(--fm-shadow-lg) !important;
    border: 1px solid rgba(226,232,240,0.5) !important;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95) !important;
    position: relative;
    z-index: 1;
}
.fm-auth-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--fm-primary), var(--fm-accent));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.75rem;
    box-shadow: 0 8px 25px rgba(67,97,238,0.3);
}
.fm-auth-features {
    background: linear-gradient(135deg, var(--fm-primary), var(--fm-accent));
    border-radius: var(--fm-radius-lg);
    padding: 2.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.fm-auth-features::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}
.fm-auth-features li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    opacity: 0.95;
}

/* ========== ACCOUNT PAGE ========== */
.fm-account-header {
    background: linear-gradient(135deg, var(--fm-primary), var(--fm-accent));
    border-radius: var(--fm-radius-lg) var(--fm-radius-lg) 0 0;
    padding: 2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.fm-account-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 30%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}
.fm-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255,255,255,0.3);
}

/* ========== SCROLL ANIMATIONS ========== */
.fm-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.fm-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.fm-reveal.delay-1 { transition-delay: 0.1s; }
.fm-reveal.delay-2 { transition-delay: 0.2s; }
.fm-reveal.delay-3 { transition-delay: 0.3s; }
.fm-reveal.delay-4 { transition-delay: 0.4s; }
.fm-reveal.delay-5 { transition-delay: 0.5s; }
.fm-reveal.delay-6 { transition-delay: 0.6s; }

/* ========== LOADING SKELETON ========== */
.fm-skeleton {
    position: relative;
    overflow: hidden;
    background: var(--fm-bg-alt);
    border-radius: 6px;
}
.fm-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.fm-skeleton-text { height: 14px; margin-bottom: 8px; }
.fm-skeleton-stat { height: 40px; width: 60px; margin: 0 auto; }

/* ========== TOAST NOTIFICATIONS ========== */
.fm-toast {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--fm-radius-sm);
    color: #fff;
    background: var(--fm-primary);
    box-shadow: var(--fm-shadow-md);
    font-size: 0.9rem;
    animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.fm-toast-success { background: #16a34a; }
.fm-toast-danger { background: #dc2626; }
.fm-toast-warning { background: #d97706; color: #fff; }
.fm-toast-info { background: var(--fm-primary); }
.fm-toast.removing {
    animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(60px); }
}

/* ========== MODULE PANEL TRANSITION ========== */
.module-panel {
    animation: panelFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== MISC ========== */
.fm-gradient-text {
    background: linear-gradient(135deg, var(--fm-primary), var(--fm-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.fm-divider {
    height: 3px;
    width: 60px;
    background: linear-gradient(90deg, var(--fm-primary), var(--fm-accent));
    border-radius: 3px;
    margin: 0 auto 1.5rem;
}
h2.fw-bold { letter-spacing: -0.03em; }
section h2 { color: var(--fm-text); }
section .text-muted { color: var(--fm-muted) !important; }

/* ========== WHO IT'S FOR (AUDIENCE) ========== */
.fm-audience-section {
    background: var(--fm-bg-warm);
    position: relative;
}
.fm-audience-card {
    background: var(--fm-card);
    border-radius: var(--fm-radius-lg);
    border: 1px solid var(--fm-border-light);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all var(--fm-transition);
    position: relative;
    overflow: hidden;
}
.fm-audience-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--fm-shadow-lg);
}
.fm-audience-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--fm-primary), var(--fm-accent));
    transform: scaleX(0);
    transition: transform var(--fm-transition);
}
.fm-audience-card:hover::after {
    transform: scaleX(1);
}
.fm-audience-emoji {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
}

/* ========== TESTIMONIALS ========== */
.fm-testimonial-card {
    background: var(--fm-card);
    border-radius: var(--fm-radius-lg);
    border: 1px solid var(--fm-border-light);
    padding: 2rem;
    position: relative;
    transition: all var(--fm-transition);
}
.fm-testimonial-card:hover {
    box-shadow: var(--fm-shadow-md);
    transform: translateY(-4px);
}
.fm-testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: -8px;
    left: 1.5rem;
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--fm-primary), var(--fm-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    opacity: 0.3;
}
.fm-testimonial-stars {
    color: var(--fm-warning);
    font-size: 0.875rem;
    letter-spacing: 2px;
}
.fm-testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fm-primary), var(--fm-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ========== PLATFORM SHOWCASE ========== */
.fm-platform-section {
    background: linear-gradient(135deg, var(--fm-primary) 0%, var(--fm-accent) 100%);
    position: relative;
    overflow: hidden;
}
.fm-platform-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 40%);
    pointer-events: none;
}
.fm-device-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--fm-radius);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    transition: all var(--fm-transition);
    border: 1px solid rgba(255,255,255,0.2);
    margin: 0 auto;
}
.fm-device-icon:hover {
    transform: scale(1.1) translateY(-4px);
    background: rgba(255,255,255,0.25);
}

/* ========== SOCIAL PROOF ENHANCED ========== */
.fm-social-proof {
    background: var(--fm-card);
    border-radius: var(--fm-radius-lg);
    box-shadow: var(--fm-shadow);
    border: 1px solid var(--fm-border-light);
    position: relative;
    top: -40px;
    margin-bottom: -20px;
    z-index: 2;
}
.fm-proof-stat {
    text-align: center;
    padding: 1rem;
}
.fm-proof-stat .fs-4 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ========== PRICING ENHANCED ========== */
.fm-pricing-card {
    border-radius: var(--fm-radius-lg);
    border: 1px solid var(--fm-border-light);
    transition: all var(--fm-transition);
    overflow: hidden;
}
.fm-pricing-card:hover {
    box-shadow: var(--fm-shadow-lg);
    transform: translateY(-4px);
}
.fm-pricing-card .list-unstyled li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========== COUNTER ANIMATION ========== */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== RESPONSIVE TWEAKS ========== */
@media (max-width: 767.98px) {
    .fm-hero h1 { font-size: 2.2rem; }
    .fm-pricing-popular { transform: scale(1); }
    .fm-auth-features { display: none; }
}

/* Shopping list checked item */
.shopping-checked td { text-decoration: line-through; opacity: 0.6; }

/* ========== DARK THEME TOGGLE ========== */
.fm-theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--fm-border);
    background: var(--fm-card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--fm-text-secondary);
    transition: all var(--fm-transition);
    padding: 0;
    flex-shrink: 0;
}
.fm-theme-toggle:hover {
    border-color: var(--fm-primary);
    color: var(--fm-primary);
    background: var(--fm-primary-glow);
    transform: rotate(30deg);
}
.fm-theme-toggle .bi-moon-stars-fill { display: inline; }
.fm-theme-toggle .bi-sun-fill { display: none; }

/* ========== DARK THEME ========== */
[data-bs-theme="dark"] {
    --fm-bg: #0f1117;
    --fm-bg-alt: #161822;
    --fm-bg-warm: #141620;
    --fm-card: #1a1d2e;
    --fm-text: #e4e6f0;
    --fm-text-secondary: #a8adc0;
    --fm-muted: #6c7293;
    --fm-border: #2a2d42;
    --fm-border-light: #222538;
    --fm-primary-glow: rgba(67, 97, 238, 0.15);
    --fm-shadow-sm: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15);
    --fm-shadow: 0 4px 6px -1px rgba(0,0,0,0.25), 0 2px 4px -2px rgba(0,0,0,0.15);
    --fm-shadow-md: 0 10px 30px -5px rgba(0,0,0,0.35);
    --fm-shadow-lg: 0 20px 50px -12px rgba(0,0,0,0.4);
    --fm-shadow-glow: 0 0 40px rgba(67,97,238,0.2);
    --fm-shadow-warm: 0 10px 30px -5px rgba(247,37,133,0.15);
    color-scheme: dark;
}

/* Dark theme — toggle icon swap */
[data-bs-theme="dark"] .fm-theme-toggle .bi-moon-stars-fill { display: none; }
[data-bs-theme="dark"] .fm-theme-toggle .bi-sun-fill { display: inline; color: var(--fm-warning); }
[data-bs-theme="dark"] .fm-theme-toggle {
    border-color: var(--fm-border);
    background: var(--fm-card);
    color: var(--fm-warning);
}

/* Dark theme — Navbar */
[data-bs-theme="dark"] .fm-navbar {
    background: rgba(15, 17, 23, 0.92);
    border-bottom-color: var(--fm-border);
}
[data-bs-theme="dark"] .fm-navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
[data-bs-theme="dark"] .fm-navbar .navbar-brand {
    color: var(--fm-primary-light);
}
[data-bs-theme="dark"] .fm-navbar .nav-link {
    color: var(--fm-text-secondary);
}
[data-bs-theme="dark"] .fm-navbar .nav-link:hover {
    color: var(--fm-primary-light);
}
[data-bs-theme="dark"] .fm-navbar .dropdown-menu {
    background: var(--fm-card);
    border-color: var(--fm-border);
}
[data-bs-theme="dark"] .fm-navbar .dropdown-item {
    color: var(--fm-text);
}
[data-bs-theme="dark"] .fm-navbar .dropdown-item:hover {
    background: var(--fm-bg-alt);
    color: var(--fm-primary-light);
}
[data-bs-theme="dark"] .navbar-toggler-icon {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Dark theme — Body & cards */
[data-bs-theme="dark"] body {
    background: var(--fm-bg);
    color: var(--fm-text);
}
[data-bs-theme="dark"] .card {
    background: var(--fm-card);
    border-color: var(--fm-border);
}
[data-bs-theme="dark"] .card-header {
    background: var(--fm-bg-alt);
    border-bottom-color: var(--fm-border);
}
[data-bs-theme="dark"] .bg-white {
    background: var(--fm-card) !important;
}
[data-bs-theme="dark"] .bg-light {
    background: var(--fm-bg-alt) !important;
}

/* Dark theme — text overrides for inline styles */
[data-bs-theme="dark"] [style*="color: var(--fm-text)"] {
    color: var(--fm-text) !important;
}
[data-bs-theme="dark"] .text-dark {
    color: var(--fm-text) !important;
}
[data-bs-theme="dark"] .text-muted {
    color: var(--fm-muted) !important;
}
[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2, [data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4, [data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6 {
    color: var(--fm-text);
}

/* Dark theme — Hero (gradient stays, just tweak the bottom fade) */
[data-bs-theme="dark"] .fm-hero::after {
    background: linear-gradient(to top, var(--fm-bg), transparent);
}

/* Dark theme — Feature cards */
[data-bs-theme="dark"] .fm-feature-card {
    background: var(--fm-card);
    border-color: var(--fm-border) !important;
}
[data-bs-theme="dark"] .fm-icon-wrap {
    background: var(--fm-bg-alt);
}
[data-bs-theme="dark"] .fm-icon-wrap.icon-primary { background: rgba(67,97,238,0.12); }
[data-bs-theme="dark"] .fm-icon-wrap.icon-success { background: rgba(6,214,160,0.12); }
[data-bs-theme="dark"] .fm-icon-wrap.icon-info { background: rgba(76,201,240,0.12); }
[data-bs-theme="dark"] .fm-icon-wrap.icon-warning { background: rgba(251,176,45,0.12); }
[data-bs-theme="dark"] .fm-icon-wrap.icon-danger { background: rgba(239,71,111,0.12); }
[data-bs-theme="dark"] .fm-icon-wrap.icon-purple { background: rgba(114,9,183,0.12); }

/* Dark theme — Audience / Testimonial cards */
[data-bs-theme="dark"] .fm-audience-section { background: var(--fm-bg-alt); }
[data-bs-theme="dark"] .fm-audience-card {
    background: var(--fm-card);
    border-color: var(--fm-border);
}
[data-bs-theme="dark"] .fm-testimonial-card {
    background: var(--fm-card);
    border-color: var(--fm-border);
}

/* Dark theme — Social proof */
[data-bs-theme="dark"] .fm-social-proof {
    background: var(--fm-card);
    border-color: var(--fm-border);
}

/* Dark theme — Footer */
[data-bs-theme="dark"] .fm-footer {
    background: linear-gradient(180deg, var(--fm-bg) 0%, var(--fm-bg-alt) 50%, #0d0f18 100%);
    border-top-color: var(--fm-border);
}
[data-bs-theme="dark"] .fm-footer .badge.bg-light {
    background: var(--fm-bg-alt) !important;
    color: var(--fm-muted) !important;
    border-color: var(--fm-border) !important;
}

/* Dark theme — Tables */
[data-bs-theme="dark"] .table {
    color: var(--fm-text);
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(67,97,238,0.06);
}
[data-bs-theme="dark"] .table th {
    color: var(--fm-muted);
    border-color: var(--fm-border);
}
[data-bs-theme="dark"] .table td {
    border-color: var(--fm-border);
}

/* Dark theme — Forms */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background: var(--fm-bg-alt);
    border-color: var(--fm-border);
    color: var(--fm-text);
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background: var(--fm-bg-alt);
    border-color: var(--fm-primary-light);
    color: var(--fm-text);
}
[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--fm-muted);
}
[data-bs-theme="dark"] .form-label {
    color: var(--fm-text-secondary);
}
[data-bs-theme="dark"] .input-group-text {
    background: var(--fm-bg-alt);
    border-color: var(--fm-border);
    color: var(--fm-muted);
}

/* Dark theme — Auth pages */
[data-bs-theme="dark"] .fm-auth-wrapper {
    background: linear-gradient(135deg, var(--fm-bg) 0%, var(--fm-bg-alt) 50%, #0d0f18 100%);
}
[data-bs-theme="dark"] .fm-auth-card {
    background: var(--fm-card) !important;
    border-color: var(--fm-border) !important;
}

/* Dark theme — Pricing */
[data-bs-theme="dark"] .fm-pricing-card {
    background: var(--fm-card);
    border-color: var(--fm-border);
}
[data-bs-theme="dark"] .fm-pricing-popular {
    background: linear-gradient(180deg, rgba(67,97,238,0.08) 0%, var(--fm-card) 100%);
    border-color: var(--fm-primary) !important;
}

/* Dark theme — Stat cards */
[data-bs-theme="dark"] .fm-stat-card {
    background: var(--fm-card);
}

/* Dark theme — Sidebar (dashboard) */
[data-bs-theme="dark"] .fm-sidebar {
    background: var(--fm-card) !important;
    border-right-color: var(--fm-border);
}

/* Dark theme — Account */
[data-bs-theme="dark"] .fm-account-header {
    /* gradient stays — it's already dark-friendly */
}

/* Dark theme — Alerts */
[data-bs-theme="dark"] .alert {
    border: 1px solid var(--fm-border);
}

/* Dark theme — misc */
[data-bs-theme="dark"] .shadow-sm {
    box-shadow: var(--fm-shadow-sm) !important;
}
[data-bs-theme="dark"] .border-bottom {
    border-color: var(--fm-border) !important;
}
[data-bs-theme="dark"] hr {
    border-color: var(--fm-border);
    opacity: 0.3;
}
[data-bs-theme="dark"] .accordion-button {
    background: var(--fm-card);
    color: var(--fm-text);
}
[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background: var(--fm-bg-alt);
    color: var(--fm-primary-light);
}
[data-bs-theme="dark"] .accordion-body {
    background: var(--fm-card);
    color: var(--fm-text-secondary);
}
[data-bs-theme="dark"] .accordion-item {
    border-color: var(--fm-border);
    background: var(--fm-card);
}
[data-bs-theme="dark"] .btn-outline-primary {
    color: var(--fm-primary-light);
    border-color: var(--fm-primary-light);
}
[data-bs-theme="dark"] .btn-light {
    background: var(--fm-bg-alt);
    color: var(--fm-text);
    border-color: var(--fm-border);
}
[data-bs-theme="dark"] .btn-light:hover {
    background: var(--fm-border);
    color: var(--fm-text);
}
[data-bs-theme="dark"] .modal-content {
    background: var(--fm-card);
    border-color: var(--fm-border);
    color: var(--fm-text);
}
[data-bs-theme="dark"] .list-group-item {
    background: var(--fm-card);
    border-color: var(--fm-border);
    color: var(--fm-text);
}

/* Dark theme — skeleton shimmer */
[data-bs-theme="dark"] .fm-skeleton {
    background: var(--fm-bg-alt);
}
[data-bs-theme="dark"] .fm-skeleton::after {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
}

/* Dark theme — bg-warm utility in content */
[data-bs-theme="dark"] .bg-warm,
[data-bs-theme="dark"] [style*="background: #fffbf7"],
[data-bs-theme="dark"] [style*="background-color: #fffbf7"],
[data-bs-theme="dark"] section[style*="fffbf7"] {
    background: var(--fm-bg-alt) !important;
}

/* Dark theme — avatar border fix */
[data-bs-theme="dark"] .fm-avatar {
    border-color: var(--fm-card) !important;
    background: var(--fm-bg-alt) !important;
}
