:root {
    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-link-color: #4f46e5;
    --bs-link-hover-color: #3730a3;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

/* Custom Overrides to Align Bootstrap Primary with Theme Indigo */
.text-primary {
    color: #4f46e5 !important;
}
.bg-primary {
    background-color: #4f46e5 !important;
}
.border-primary {
    border-color: #4f46e5 !important;
}
.btn-primary {
    background-color: #4f46e5 !important;
    border-color: #4f46e5 !important;
}
.btn-outline-primary {
    color: #4f46e5 !important;
    border-color: #4f46e5 !important;
}
.btn-outline-primary:hover {
    background-color: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: white !important;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-primary-custom {
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-secondary-custom {
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background-color: #f1f5f9;
    transform: translateY(-1px);
}

.card-custom {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.card-custom-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.main-content {
    flex: 1;
    padding: 40px 0;
}

footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 40px 0;
    font-size: 14px;
    border-top: 1px solid #1e293b;
}
footer a {
    color: #cbd5e1;
    transition: color 0.2s ease;
}
footer a:hover {
    color: #ffffff;
}
.text-slate-300 {
    color: #cbd5e1 !important;
}
.text-slate-500 {
    color: #64748b !important;
}

/* SWOT Report Styling */
.swot-card {
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    border: none;
}
.swot-s { background-color: #ecfdf5; border-left: 5px solid #10b981; }
.swot-w { background-color: #fef2f2; border-left: 5px solid #ef4444; }
.swot-o { background-color: #eff6ff; border-left: 5px solid #3b82f6; }
.swot-t { background-color: #fffbeb; border-left: 5px solid #f59e0b; }

.pricing-gauge {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    border-radius: 16px;
    padding: 30px;
}
.progress-bar-custom {
    height: 8px;
    border-radius: 4px;
    background-color: #e2e8f0;
    overflow: hidden;
}

/* Micro-animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Premium Top Navigation Progress Bar */
#top-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #10b981 100%);
    z-index: 99999;
    width: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6), 0 0 5px rgba(16, 185, 129, 0.6);
    pointer-events: none;
}

/* Global Glassmorphism Action Loader */
#global-action-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}
#global-action-loader.show {
    opacity: 1;
    pointer-events: auto;
}
.loader-glow-ring {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
}
.loader-ring-1 {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin-clockwise 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
.loader-ring-2 {
    position: absolute;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border: 4px solid transparent;
    border-bottom-color: #10b981;
    border-radius: 50%;
    animation: spin-counter-clockwise 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
.loader-ring-3 {
    position: absolute;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border: 4px solid transparent;
    border-right-color: #a855f7;
    border-radius: 50%;
    animation: spin-clockwise 0.8s linear infinite;
}
.loader-center-icon {
    position: absolute;
    top: 25%;
    left: 25%;
    width: 50%;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    animation: pulse-scale 1.5s ease-in-out infinite;
}
.loader-text {
    color: #f8fafc;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    animation: pulse-opacity 2s infinite ease-in-out;
}
.loader-subtext {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 6px;
    letter-spacing: 0.2px;
}
.loader-cancel-btn {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    padding: 6px 18px;
    font-size: 0.75rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.loader-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Animations */
@keyframes spin-clockwise {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes spin-counter-clockwise {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}
@keyframes pulse-scale {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}
@keyframes pulse-opacity {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 1; }
}

/* Responsive Mobile-first Styling Overrides */
@media (max-width: 576px) {
    h1, .h1, .display-4 {
        font-size: 2.1rem !important;
        line-height: 1.25 !important;
        letter-spacing: -0.5px !important;
        padding-bottom: 6px;
    }
    
    h2, .h2 {
        font-size: 1.65rem !important;
        line-height: 1.3 !important;
        letter-spacing: -0.3px !important;
    }
    
    h3, .h3 {
        font-size: 1.4rem !important;
    }

    .main-content {
        padding: 24px 0 !important;
    }

    /* Prevent huge paddings in cards on small screens */
    .card-custom {
        padding: 20px !important;
    }

    /* Adjust button sizes slightly for smaller screens */
    .btn-lg {
        padding: 10px 18px !important;
        font-size: 0.95rem !important;
    }
    
    .d-flex.flex-wrap.gap-3 {
        gap: 12px !important;
    }
}

