/* ═══════════════════════════════════════════════════════════════════
   crm-erp.css — Page-specific styles for CRM/ERP Calculator
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Business Card Base ───────────────────────────────────────── */
.business-card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.business-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.3);
}
.business-card.active {
    border-color: #2563eb !important;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(124, 58, 237, 0.04));
}

/* ─── Feature Icon ─────────────────────────────────────────────── */
.feature-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(124, 58, 237, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.4s;
}
.module-card:hover .feature-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(124, 58, 237, 0.1));
    transform: scale(1.08);
}

/* ─── Module Cards ─────────────────────────────────────────────── */
.module-card {
    cursor: pointer; user-select: none; position: relative;
}
.module-card .check-dot {
    width: 22px; height: 22px; border-radius: 7px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.6);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: all .2s;
}
.module-card.selected {
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.15);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(124, 58, 237, 0.03));
}
.module-card.selected .check-dot {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
    color: #ffffff !important;
}
.module-card.selected .check-dot i,
.module-card.selected .check-dot svg {
    display: block !important;
    stroke: #ffffff !important;
    stroke-width: 3px !important;
    width: 14px !important;
    height: 14px !important;
}
.module-card .check-dot i,
.module-card .check-dot svg {
    display: none;
    width: 14px;
    height: 14px;
    color: white;
    stroke: white;
}

/* ─── Toggle Pill ──────────────────────────────────────────────── */
.toggle-pill { display: inline-flex; background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 4px; }
.toggle-pill button { border: none; background: transparent; color: #94a3b8; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 9px 16px; border-radius: 9px; cursor: pointer; font-family: 'Outfit', sans-serif; transition: all .2s; }
.toggle-pill button.active { background: linear-gradient(45deg, #2563eb, #7c3aed); color: white; }

/* ─── Stepper Button ───────────────────────────────────────────── */
.stepper-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(15, 23, 42, 0.6); color: #f8fafc; font-size: 18px; cursor: pointer; transition: all .2s; }
.stepper-btn:hover { border-color: rgba(59, 130, 246, 0.5); color: #60a5fa; }

/* ─── Chips ────────────────────────────────────────────────────── */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 20px;
    padding: 5px 8px 5px 12px;
    font-size: 12px;
    color: #cbd5e1;
    transition: all 0.2s ease;
}
.chip b { color: #60a5fa; font-weight: 700; }
.chip .remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    margin-left: 2px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}
.chip .remove-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    transform: scale(1.15);
}

/* ─── Calculator Input ─────────────────────────────────────────── */
.calc-input { width: 100%; background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 12px 16px; color: #f8fafc; font-size: 14px; font-family: 'Outfit', sans-serif; outline: none; transition: all .3s; margin-bottom: 10px; }
.calc-input:focus { border-color: rgba(59, 130, 246, 0.6); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.calc-input::placeholder { color: #64748b; }

/* ─── FAQ ──────────────────────────────────────────────────────── */
.faq-item .chev { transition: transform .2s; }
.faq-item.open .chev { transform: rotate(45deg); color: #60a5fa; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.open .faq-a { max-height: 200px; }

/* ─── Preset Badge ─────────────────────────────────────────────── */
.preset-badge {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 10px;
    color: #60a5fa;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ─── Info Button ──────────────────────────────────────────────── */
.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    cursor: pointer;
    border: 1px solid rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.15);
    color: #34d399 !important;
    padding: 3px;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}
.info-btn:hover {
    color: #ffffff !important;
    background: rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.6);
    transform: scale(1.25);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.5);
}
.info-btn::after {
    content: '';
    position: absolute;
    inset: -6px;
}


/* ═══════════════════════════════════════════════════════════════════
   iPhone App Icon Grid — MOBILE ONLY
   ═══════════════════════════════════════════════════════════════════ */
#businessGrid {
    display: none !important;
}
@media (max-width: 639px) {
    #businessGrid {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 12px 8px !important;
        max-width: 100% !important;
        margin: 0 auto 24px !important;
    }
}

/* ─── Desktop Rectangular Card Grid — DESKTOP ONLY ─────────────── */
#businessGridDesktop {
    display: none;
}
@media (min-width: 640px) {
    #businessGridDesktop {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
        max-width: 900px;
        margin: 0 auto 32px;
    }
}
@media (min-width: 1024px) {
    #businessGridDesktop {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }
}
@media (min-width: 1280px) {
    #businessGridDesktop {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
.desktop-preset-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.desktop-preset-card:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
}
.desktop-preset-card.active {
    border-color: #2563eb !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(124, 58, 237, 0.08)) !important;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.25) !important;
}
.desktop-preset-card .dp-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
}
.desktop-preset-card.active .dp-icon {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}
.desktop-preset-card .dp-icon i,
.desktop-preset-card .dp-icon svg {
    width: 18px;
    height: 18px;
    color: #60a5fa;
}
.desktop-preset-card.active .dp-icon i,
.desktop-preset-card.active .dp-icon svg {
    color: #93c5fd;
}
.desktop-preset-card .dp-name {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    line-height: 1.3;
    transition: color 0.3s;
}
.desktop-preset-card:hover .dp-name {
    color: #f1f5f9;
}
.desktop-preset-card.active .dp-name {
    color: #ffffff !important;
}

/* ─── Business Card / App Icon ─────────────────────────────────── */
.business-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    cursor: pointer !important;
}
.app-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding-top: 6px;
    padding-bottom: 4px;
}
.app-icon:hover {
    transform: scale(1.08);
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(255, 255, 255, 0.04);
}
.app-icon.active {
    border-color: #2563eb !important;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.35) !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(124, 58, 237, 0.1)) !important;
    transform: scale(1.05);
}
.app-icon i, .app-icon svg {
    width: 24px;
    height: 24px;
    color: #60a5fa;
    transition: color 0.3s;
}
.app-icon span {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    margin-top: 4px;
    line-height: 1;
    letter-spacing: 0.08em;
    transition: color 0.3s;
    text-transform: uppercase;
}
.app-icon:hover span {
    color: #f8fafc;
}
.app-icon.active span {
    color: #ffffff !important;
}


/* ═══════════════════════════════════════════════════════════════════
   LIGHT MODE — CRM/ERP specific overrides
   ═══════════════════════════════════════════════════════════════════ */

/* App Icons */
body.light-theme .app-icon {
    background: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.08);
}
body.light-theme .app-icon:hover {
    background: rgba(15, 23, 42, 0.04);
}
body.light-theme .app-icon.active {
    border-color: #2563eb !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.25) !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(124, 58, 237, 0.06)) !important;
}
body.light-theme .app-icon span {
    color: #475569;
}
body.light-theme .app-icon:hover span {
    color: #0f172a;
}
body.light-theme .app-icon.active span {
    color: #2563eb !important;
}
body.light-theme .app-icon i,
body.light-theme .app-icon svg {
    color: #3b82f6 !important;
}
body.light-theme .app-icon.active i,
body.light-theme .app-icon.active svg {
    color: #2563eb !important;
}

/* Desktop Preset Cards */
body.light-theme .desktop-preset-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
body.light-theme .desktop-preset-card:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.08);
}
body.light-theme .desktop-preset-card.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(124, 58, 237, 0.05)) !important;
    border-color: #2563eb !important;
}
body.light-theme .desktop-preset-card .dp-icon i,
body.light-theme .desktop-preset-card .dp-icon svg {
    color: #3b82f6;
}
body.light-theme .desktop-preset-card .dp-name {
    color: #334155;
}
body.light-theme .desktop-preset-card:hover .dp-name {
    color: #0f172a;
}
body.light-theme .desktop-preset-card.active .dp-name {
    color: #1e40af !important;
}

/* Module Cards */
body.light-theme .module-card.selected {
    border-color: rgba(59, 130, 246, 0.6) !important;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.18) !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(124, 58, 237, 0.06)) !important;
}
body.light-theme .module-card .check-dot {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.2);
}
body.light-theme .module-card.selected .check-dot {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

body.light-theme #navbar a:hover {
    color: #000000 !important;
}

/* Mobile Hamburger & Controls in Light Mode */
body.light-theme #navbar button:not(.bg-gradient-btn):not(.btn-always-white),
body.light-theme nav button:not(.bg-gradient-btn):not(.btn-always-white),
body.light-theme button[onclick*="toggleMenu"],
body.light-theme .mobile-menu-toggle,
body.light-theme .mobile-menu-btn {
    color: #0f172a !important;
}

body.light-theme #navbar button:not(.bg-gradient-btn):not(.btn-always-white) svg,
body.light-theme nav button:not(.bg-gradient-btn):not(.btn-always-white) svg,
body.light-theme button[onclick*="toggleMenu"] svg,
body.light-theme .mobile-menu-toggle svg,
body.light-theme .mobile-menu-btn svg,
body.light-theme #navbar button:not(.bg-gradient-btn):not(.btn-always-white) i,
body.light-theme nav button:not(.bg-gradient-btn):not(.btn-always-white) i,
body.light-theme button[onclick*="toggleMenu"] i {
    color: #0f172a !important;
    stroke: #0f172a !important;
}

body.light-theme #navbar button:not(.bg-gradient-btn):not(.btn-always-white):hover,
body.light-theme nav button:not(.bg-gradient-btn):not(.btn-always-white):hover,
body.light-theme button[onclick*="toggleMenu"]:hover,
body.light-theme .mobile-menu-toggle:hover,
body.light-theme .mobile-menu-btn:hover {
    color: #2563eb !important;
}

body.light-theme #navbar button:not(.bg-gradient-btn):not(.btn-always-white):hover svg,
body.light-theme nav button:not(.bg-gradient-btn):not(.btn-always-white):hover svg,
body.light-theme button[onclick*="toggleMenu"]:hover svg,
body.light-theme .mobile-menu-toggle:hover svg,
body.light-theme .mobile-menu-btn:hover svg,
body.light-theme #navbar button:not(.bg-gradient-btn):not(.btn-always-white):hover i,
body.light-theme nav button:not(.bg-gradient-btn):not(.btn-always-white):hover i,
body.light-theme button[onclick*="toggleMenu"]:hover i {
    color: #2563eb !important;
    stroke: #2563eb !important;
}


/* Calculator */
body.light-theme .calc-input {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    color: #0f172a !important;
}
body.light-theme .calc-input::placeholder {
    color: #94a3b8;
}
body.light-theme .toggle-pill {
    background: rgba(226, 232, 240, 0.8) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
}
body.light-theme .toggle-pill button {
    color: #64748b;
}
body.light-theme .toggle-pill button.active {
    color: #ffffff;
}
body.light-theme .stepper-btn {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    color: #0f172a !important;
}

/* Chips */
body.light-theme .chip {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.25);
    color: #334155;
}
body.light-theme .chip .remove-btn {
    background: rgba(15, 23, 42, 0.08);
    color: #64748b;
}
body.light-theme .chip .remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Module Info Modal */
body.light-theme #moduleInfoModal {
    background-color: rgba(15, 23, 42, 0.4) !important;
}
body.light-theme #moduleInfoModal h3,
body.light-theme #moduleInfoModal h4 {
    color: #0f172a !important;
}
body.light-theme #moduleInfoModal p,
body.light-theme #moduleInfoModal li {
    color: #334155 !important;
}
body.light-theme #moduleInfoModal .glass-static {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    color: #0f172a !important;
}
body.light-theme #moduleInfoModal .glass-static:hover {
    border-color: rgba(15, 23, 42, 0.2) !important;
}

/* Hero Stats & Floating Cards */
body.light-theme #heroSection .text-white {
    color: #1e293b !important;
}
body.light-theme #heroPresetName,
body.light-theme #stickyPresetName,
body.light-theme #sumUsers,
body.light-theme #sumModules,
body.light-theme #sumBase {
    color: #1e293b !important;
}
body.light-theme #heroFloatingCalc button,
body.light-theme #stickyFloatingBar button {
    color: #334155 !important;
}
body.light-theme #heroFloatingCalc button:hover,
body.light-theme #stickyFloatingBar button:hover {
    color: #0f172a !important;
}
body.light-theme #heroFloatingCalc .bg-gradient-btn,
body.light-theme #stickyFloatingBar .bg-gradient-btn {
    color: #ffffff !important;
}
body.light-theme #heroFloatingCalc .text-slate-400,
body.light-theme #stickyFloatingBar .text-slate-400 {
    color: #64748b !important;
}

/* Hero Badge */
body.light-theme .border-blue-500\/20.bg-blue-950\/40 {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}
body.light-theme #heroBadge {
    color: #334155 !important;
}

/* FAQ */
body.light-theme .faq-item {
    border-color: rgba(15, 23, 42, 0.08) !important;
}
body.light-theme .faq-q {
    color: #0f172a !important;
}
body.light-theme .faq-a {
    color: #475569 !important;
}


/* ═══════════════════════════════════════════════════════════════════
   MOBILE LAYOUT OPTIMIZATION
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    #heroSection {
        padding-top: 96px !important;
        padding-bottom: 24px !important;
        min-h-0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    #heroSection .max-w-6xl {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    #heroSection h1 {
        font-size: clamp(2.1rem, 7.5vw, 3rem) !important;
        line-height: 1.06 !important;
        margin-bottom: 16px !important;
    }
    #heroSection p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        margin-bottom: 24px !important;
    }
    #businessGrid {
        padding: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        justify-items: stretch !important;
    }
    .business-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        padding: 0 !important;
    }
    .app-icon {
        width: 100% !important;
        max-width: 60px !important;
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
        border-radius: 15px !important;
    }
    .app-icon i, .app-icon svg {
        width: 20px !important;
        height: 20px !important;
    }
    .app-icon span {
        font-size: 9px !important;
        margin-top: 2px !important;
    }
    #heroFloatingCalc {
        padding: 12px 14px !important;
        margin-bottom: 20px !important;
        border-radius: 18px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    #heroFloatingCalc button, #heroFloatingCalc a {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        border-radius: 10px !important;
    }
    /* Make module cards smaller on mobile */
    .module-card {
        padding: 12px !important;
        border-radius: 14px !important;
    }
    .module-card .feature-icon {
        width: 34px !important;
        height: 34px !important;
        border-radius: 10px !important;
    }
    .module-card .feature-icon svg {
        width: 15px !important;
        height: 15px !important;
    }
    .module-card .check-dot {
        width: 18px !important;
        height: 18px !important;
        border-radius: 5px !important;
    }
    .module-card.selected .check-dot svg {
        width: 10px !important;
        height: 10px !important;
    }
    .module-card h4 {
        font-size: 13px !important;
        margin-top: 4px !important;
    }
    .module-card .text-blue-400 {
        font-size: 11px !important;
    }
    .module-card .text-xs.text-slate-500 {
        font-size: 10px !important;
        line-height: 1.3 !important;
        margin-top: 4px !important;
    }
}
