/**
 * QUOTIVA Modern Fintech & Procurement Stylesheet
 * Vibrant, Professional, Multi-Colored Cards & Mobile-First Design System
 */

:root {
    --qv-primary: #1a56db;
    --qv-primary-dark: #0f2b5c;
    --qv-primary-hover: #1e429f;
    --qv-primary-light: #eff6ff;
    --qv-primary-glow: rgba(26, 86, 219, 0.25);
    
    --qv-secondary: #059669;
    --qv-secondary-dark: #065f46;
    --qv-secondary-hover: #047857;
    --qv-secondary-light: #ecfdf5;
    
    --qv-cyan: #0891b2;
    --qv-cyan-light: #ecfeff;
    --qv-accent: #f59e0b;
    --qv-purple: #7c3aed;
    --qv-rose: #e11d48;
    --qv-dark: #0f172a;
    --qv-dark-subtle: #475569;
    --qv-body-bg: #f4f7fb;
    --qv-surface: #ffffff;
    --qv-border: #e2e8f0;
    --qv-border-light: #f1f5f9;
    
    --qv-gradient-primary: linear-gradient(135deg, #0f2b5c 0%, #1a56db 55%, #059669 100%);
    --qv-gradient-emerald: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --qv-gradient-blue: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --qv-gradient-cyan: linear-gradient(135deg, #0e7490 0%, #06b6d4 100%);
    --qv-gradient-purple: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --qv-gradient-amber: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --qv-gradient-rose: linear-gradient(135deg, #be123c 0%, #f43f5e 100%);
    
    --qv-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --qv-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    --qv-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
    --qv-shadow-glow: 0 0 24px rgba(26, 86, 219, 0.2);
    --qv-radius: 14px;
    --qv-radius-lg: 18px;
}

/* Base & Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--qv-body-bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(26, 86, 219, 0.04) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(5, 150, 105, 0.04) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--qv-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* Navbar */
.navbar-quotiva {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--qv-border);
}

.navbar-brand .brand-logo {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #0f2b5c 0%, #1a56db 60%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-brand .brand-dot {
    color: var(--qv-secondary);
    -webkit-text-fill-color: var(--qv-secondary);
}

.nav-link {
    font-weight: 500;
    color: var(--qv-dark-subtle);
    padding: 0.55rem 0.95rem !important;
    border-radius: 9px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--qv-primary);
    background-color: var(--qv-primary-light);
}

.nav-link.active {
    color: var(--qv-primary);
    background-color: var(--qv-primary-light);
    font-weight: 600;
}

/* Modern Hamburger Button Style */
.hamburger-toggle {
    width: 44px;
    height: 44px;
    background: var(--qv-primary-light);
    border: 1px solid rgba(26, 86, 219, 0.2);
    border-radius: 10px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hamburger-toggle:focus {
    box-shadow: 0 0 0 3px var(--qv-primary-glow);
    outline: none;
}

.hamburger-toggle .bar {
    width: 20px;
    height: 2.5px;
    background-color: var(--qv-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger-toggle:not(.collapsed) .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger-toggle:not(.collapsed) .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-toggle:not(.collapsed) .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #091a36 0%, #0d3b66 50%, #059669 100%);
    color: #ffffff;
    padding: 4.5rem 1rem;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--qv-secondary);
}

.hero-section::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -15%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, rgba(26, 86, 219, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.hero-tagline {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 650px;
}

/* Cards & Containers */
.card-qv {
    background: #ffffff;
    border: 1px solid var(--qv-border);
    border-radius: var(--qv-radius);
    box-shadow: var(--qv-shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-qv-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--qv-shadow-lg);
    border-color: rgba(26, 86, 219, 0.3);
}

/* ==========================================================
 * Multi-Colored Category Cards (Themes)
 * ========================================================== */
.cat-theme-blue {
    --theme-color: #1a56db;
    --theme-bg: #eff6ff;
    --theme-border: #bfdbfe;
    --theme-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --theme-glow: rgba(37, 99, 235, 0.2);
}
.cat-theme-emerald {
    --theme-color: #059669;
    --theme-bg: #ecfdf5;
    --theme-border: #a7f3d0;
    --theme-gradient: linear-gradient(135deg, #047857 0%, #10b981 100%);
    --theme-glow: rgba(16, 185, 129, 0.2);
}
.cat-theme-purple {
    --theme-color: #7c3aed;
    --theme-bg: #f5f3ff;
    --theme-border: #ddd6fe;
    --theme-gradient: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
    --theme-glow: rgba(139, 92, 246, 0.2);
}
.cat-theme-amber {
    --theme-color: #d97706;
    --theme-bg: #fffbeb;
    --theme-border: #fde68a;
    --theme-gradient: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
    --theme-glow: rgba(245, 158, 11, 0.2);
}
.cat-theme-rose {
    --theme-color: #e11d48;
    --theme-bg: #fff1f2;
    --theme-border: #fecdd3;
    --theme-gradient: linear-gradient(135deg, #be123c 0%, #f43f5e 100%);
    --theme-glow: rgba(244, 63, 94, 0.2);
}
.cat-theme-cyan {
    --theme-color: #0891b2;
    --theme-bg: #ecfeff;
    --theme-border: #a5f3fc;
    --theme-gradient: linear-gradient(135deg, #0e7490 0%, #06b6d4 100%);
    --theme-glow: rgba(6, 182, 212, 0.2);
}
.cat-theme-indigo {
    --theme-color: #4f46e5;
    --theme-bg: #eef2ff;
    --theme-border: #c7d2fe;
    --theme-gradient: linear-gradient(135deg, #3730a3 0%, #6366f1 100%);
    --theme-glow: rgba(99, 102, 241, 0.2);
}
.cat-theme-orange {
    --theme-color: #ea580c;
    --theme-bg: #fff7ed;
    --theme-border: #fed7aa;
    --theme-gradient: linear-gradient(135deg, #c2410c 0%, #f97316 100%);
    --theme-glow: rgba(249, 115, 22, 0.2);
}
.cat-theme-teal {
    --theme-color: #0d9488;
    --theme-bg: #f0fdfa;
    --theme-border: #99f6e4;
    --theme-gradient: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    --theme-glow: rgba(20, 184, 166, 0.2);
}
.cat-theme-pink {
    --theme-color: #db2777;
    --theme-bg: #fdf2f8;
    --theme-border: #fbcfe8;
    --theme-gradient: linear-gradient(135deg, #be185d 0%, #ec4899 100%);
    --theme-glow: rgba(236, 72, 153, 0.2);
}

.category-card-themed {
    background: #ffffff;
    border: 1.5px solid var(--theme-border, #e2e8f0);
    border-radius: var(--qv-radius);
    padding: 1.5rem 1.15rem;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card-themed::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--theme-gradient, var(--qv-primary));
    transition: height 0.25s ease;
}

.category-card-themed:hover {
    transform: translateY(-5px);
    border-color: var(--theme-color, #1a56db);
    box-shadow: 0 12px 28px var(--theme-glow, rgba(15, 23, 42, 0.08));
    background: linear-gradient(180deg, #ffffff 0%, var(--theme-bg, #f8fafc) 100%);
}

.category-card-themed:hover::before {
    height: 6px;
}

.cat-icon-bubble {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-gradient, linear-gradient(135deg, #1e40af 0%, #3b82f6 100%));
    color: #ffffff;
    font-size: 1.75rem;
    margin-bottom: 0.9rem;
    box-shadow: 0 6px 14px var(--theme-glow, rgba(0,0,0,0.1));
    transition: transform 0.25s ease;
}

.category-card-themed:hover .cat-icon-bubble {
    transform: scale(1.12) rotate(3deg);
}

.cat-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    transition: color 0.2s;
}

.category-card-themed:hover .cat-title {
    color: var(--theme-color, #1a56db);
}

/* ==========================================================
 * Colorful "How It Works" Step Cards
 * ========================================================== */
.step-card {
    background: #ffffff;
    border-radius: var(--qv-radius);
    padding: 1.75rem 1.25rem;
    border: 1.5px solid var(--qv-border);
    height: 100%;
    position: relative;
    box-shadow: var(--qv-shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--qv-shadow-lg);
}

.step-card-blue {
    border-top: 4px solid #2563eb;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 40%);
}
.step-card-blue .step-badge {
    background: #2563eb;
    color: #ffffff;
}

.step-card-purple {
    border-top: 4px solid #7c3aed;
    background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 40%);
}
.step-card-purple .step-badge {
    background: #7c3aed;
    color: #ffffff;
}

.step-card-amber {
    border-top: 4px solid #d97706;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 40%);
}
.step-card-amber .step-badge {
    background: #d97706;
    color: #ffffff;
}

.step-card-emerald {
    border-top: 4px solid #059669;
    background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 40%);
}
.step-card-emerald .step-badge {
    background: #059669;
    color: #ffffff;
}

.step-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ==========================================================
 * Gradient Dashboard Stat Cards
 * ========================================================== */
.stat-card {
    border-radius: var(--qv-radius);
    color: #ffffff;
    padding: 1.4rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--qv-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--qv-shadow-lg);
}

.stat-card::after {
    content: "";
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.stat-card-blue {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

.stat-card-green {
    background: linear-gradient(135deg, #065f46 0%, #059669 100%);
}

.stat-card-emerald {
    background: linear-gradient(135deg, #047857 0%, #10b981 100%);
}

.stat-card-cyan {
    background: linear-gradient(135deg, #0e7490 0%, #06b6d4 100%);
}

.stat-card-purple {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
}

.stat-card-amber {
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
}

.stat-card-rose {
    background: linear-gradient(135deg, #be123c 0%, #f43f5e 100%);
}

/* ==========================================================
 * Sidebar Dark Theme (Admin & Supplier Portals)
 * ========================================================== */
.sidebar-quotiva-dark {
    background: linear-gradient(180deg, #091a36 0%, #0d274c 60%, #061327 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #e2e8f0;
    min-height: calc(100vh - 65px);
}

.sidebar-quotiva-dark .nav-link-sidebar {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    color: #94a3b8;
    font-weight: 500;
    border-radius: 9px;
    text-decoration: none;
    margin-bottom: 0.35rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-quotiva-dark .nav-link-sidebar:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.sidebar-quotiva-dark .nav-link-sidebar.active {
    background: linear-gradient(90deg, rgba(26, 86, 219, 0.45) 0%, rgba(5, 150, 105, 0.3) 100%);
    color: #ffffff;
    font-weight: 600;
    border-left-color: #10b981;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sidebar-quotiva-dark .nav-link-sidebar i {
    margin-right: 0.85rem;
    font-size: 1.15rem;
    color: #38bdf8;
    transition: transform 0.2s;
}

.sidebar-quotiva-dark .nav-link-sidebar.active i {
    color: #10b981;
    transform: scale(1.15);
}

.sidebar-quotiva-dark .sidebar-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #64748b;
    padding: 0.75rem 0.75rem 0.25rem 0.75rem;
}

.sidebar-user-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.85rem;
    margin-bottom: 1.25rem;
}

/* ==========================================================
 * Badges & Buttons
 * ========================================================== */
.badge-status-open {
    background-color: #10b981;
    color: #ffffff;
}
.badge-status-pending, .badge-status-pending_payment {
    background-color: #f59e0b;
    color: #ffffff;
}
.badge-status-awarded {
    background-color: #1a56db;
    color: #ffffff;
}
.badge-status-closed, .badge-status-expired, .badge-status-no_bids {
    background-color: #64748b;
    color: #ffffff;
}
.badge-status-cancelled {
    background-color: #ef4444;
    color: #ffffff;
}
.badge-verified {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    font-size: 0.75rem;
    padding: 0.35em 0.7em;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.btn-qv-primary {
    background: linear-gradient(135deg, #1e40af 0%, #1a56db 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: 9px;
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.25);
    transition: all 0.2s ease;
}

.btn-qv-primary:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(26, 86, 219, 0.35);
}

.btn-qv-secondary {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: 9px;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
    transition: all 0.2s ease;
}

.btn-qv-secondary:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

.btn-qv-emerald {
    background: #10b981;
    color: #ffffff;
    border: none;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: 9px;
}

.btn-qv-emerald:hover {
    background: #059669;
    color: #ffffff;
}

/* Countdown Timer */
.countdown-box {
    background: linear-gradient(135deg, #091a36 0%, #0f2b5c 100%);
    color: #38bdf8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Dynamic Line Item Rows */
.item-row {
    background: #ffffff;
    border: 1px solid var(--qv-border);
    border-radius: 10px;
    padding: 1.1rem;
    margin-bottom: 0.85rem;
}

/* Footer */
.footer-quotiva {
    background: #091a36;
    color: #94a3b8;
    padding: 3.5rem 0 1.5rem 0;
    margin-top: auto;
    border-top: 3px solid var(--qv-secondary);
}

.footer-quotiva a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-quotiva a:hover {
    color: #10b981;
}

/* Mobile Offcanvas Customization */
.offcanvas-quotiva {
    background: #ffffff;
}

@media (max-width: 991.98px) {
    .offcanvas-quotiva {
        max-width: 320px;
    }
}

/* Mobile Responsiveness & Stack Tables */
@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2.1rem;
    }
    
    .table-responsive-stack thead {
        display: none;
    }
    
    .table-responsive-stack tr {
        display: block;
        margin-bottom: 1rem;
        background: #ffffff;
        border: 1px solid var(--qv-border);
        border-radius: 10px;
        padding: 0.85rem;
    }
    
    .table-responsive-stack td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f1f5f9;
        padding: 0.55rem 0;
    }
    
    .table-responsive-stack td:last-child {
        border-bottom: none;
    }
    
    .table-responsive-stack td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--qv-dark-subtle);
        margin-right: 1rem;
    }

    .sticky-mobile-cta {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 0.75rem 1rem;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
        z-index: 1030;
    }
}
