:root {
    --primary: #1a365d;
    --primary-light: #2d4a6f;
    --primary-dark: #0f1c2e;
    
    --secondary: #f97316;
    --secondary-light: #fbbf24;
    --secondary-dark: #ea580c;
    
    --success: #10b981;
    --success-light: #34d399;
    --success-dark: #059669;
    
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-dark: #d97706;
    
    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-dark: #dc2626;
    
    --info: #3b82f6;
    --info-light: #60a5fa;
    --info-dark: #2563eb;
    
    --light: #f8fafc;
    --dark: #0f172a;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --transition-fast: 150ms ease-in-out;
    --transition-base: 200ms ease-in-out;
    --transition-slow: 300ms ease-in-out;
    
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
}

[data-theme="dark"] {
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #1e293b;
    
    --border-color: #334155;
    --border-light: #1e293b;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
}

.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn:active {
    transform: translateY(0);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: white;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-outline-secondary {
    color: var(--secondary);
    border-color: var(--secondary);
}

.btn-outline-secondary:hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}

.card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    transition: all var(--transition-base);
}

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

.card-header {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-card);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-card);
    padding: 1rem 1.5rem;
}

.form-control, .form-select {
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
    outline: none;
}

.form-check-input {
    border-radius: var(--radius-sm);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.badge {
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
}

.table {
    --bs-table-bg: var(--bg-card);
    --bs-table-border-color: var(--border-color);
    --bs-table-color: var(--text-primary);
}

.progress {
    height: 0.5rem;
    border-radius: var(--radius-full);
}

.progress-bar {
    transition: width var(--transition-slow);
}

.accordion-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.accordion-button {
    border-radius: var(--radius-lg);
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.alert {
    border-radius: var(--radius-lg);
    border: none;
}

.main-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: all var(--transition-base);
}

.main-header.sticky-top {
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-lg);
}

.brand-text {
    font-weight: 800;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(26, 54, 93, 0.05);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(26, 54, 93, 0.1);
}

.search-box {
    position: relative;
}

.search-box .input-group {
    border-radius: var(--radius-full);
    overflow: hidden;
}

.search-box .form-control {
    border-radius: var(--radius-full);
    border-right: none;
}

.search-box .btn {
    border-radius: var(--radius-full);
}

.search-form-nav {
    margin-right: 1rem;
}

.search-form-nav .input-group {
    border-radius: var(--radius);
    overflow: hidden;
    height: 34px;
}

.search-form-nav .input-group-text {
    border: 1px solid var(--border-color);
    border-right: none;
    padding: 0 0.5rem;
    background: var(--bg-card);
}

.search-form-nav .form-control {
    border: 1px solid var(--border-color);
    border-left: none;
    border-right: none;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    height: 34px;
}

.search-form-nav .form-control:focus {
    box-shadow: none;
    outline: none;
    border-color: var(--primary);
}

.search-form-nav .form-control:focus + .btn {
    border-color: var(--primary);
}

.search-form-nav .btn {
    padding: 0.25rem 0.5rem;
}

.theme-toggle {
    color: var(--text-secondary);
    background: transparent;
    border: none;
    padding: 0.5rem;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: rgba(26, 54, 93, 0.05);
    color: var(--primary);
}

.main-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-links a {
    color: var(--text-secondary);
    display: block;
    padding: 0.375rem 0;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

.contact-info i {
    font-size: 1.25rem;
}

.newsletter-box .form-control {
    border-radius: var(--radius);
}

.hero-section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.03) 0%, rgba(249, 115, 22, 0.03) 100%);
    z-index: -1;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

.hero-content .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.search-box-hero {
    margin-top: 2rem;
}

.search-box-hero .card {
    border-radius: var(--radius-xl);
}

.floating-card {
    position: absolute;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(-3deg); }
}

.hero-image {
    position: relative;
    min-height: 400px;
}

.stats-section {
    padding: 4rem 0;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.features-section, .how-it-works-section, .featured-tenders-section, .about-hero-section, .mission-vision-section, .contact-hero-section {
    padding: 5rem 0;
}

.feature-card {
    transition: all var(--transition-base);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon i {
    font-size: 1.75rem;
}

.step-card .step-number {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tender-preview-card {
    transition: all var(--transition-base);
}

.tender-preview-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.cta-section {
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
}

.pricing-card {
    transition: all var(--transition-base);
    height: 100%;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.pricing-card .price {
    margin: 1.5rem 0;
}

.pricing-card .price span:first-child {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.popular-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.tender-card {
    transition: all var(--transition-base);
}

.tender-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.filter-sidebar {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.form-check-label {
    cursor: pointer;
}

.stats-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stats-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content-center;
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 40px;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content-center;
}

.usage-stats {
    margin-bottom: 1rem;
}

.usage-stats .progress {
    height: 0.375rem;
    border-radius: var(--radius-full);
}

.deadline-item {
    transition: all var(--transition-fast);
}

.deadline-item:hover {
    background: rgba(249, 115, 22, 0.05);
}

.document-item {
    transition: all var(--transition-fast);
}

.document-item:hover {
    background: rgba(26, 54, 93, 0.02);
}

.doc-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content-center;
}

.similar-tender-card {
    transition: all var(--transition-base);
    cursor: pointer;
}

.similar-tender-card:hover {
    background: rgba(26, 54, 93, 0.05);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.sidebar-brand-text small {
    font-size: 0.75rem;
}

.sidebar-nav {
    padding: 1rem;
}

.sidebar-nav .nav-label {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
}

.sidebar-nav .nav-link:hover {
    background: rgba(26, 54, 93, 0.05);
    color: var(--primary);
}

.sidebar-nav .nav-link.active {
    background: rgba(26, 54, 93, 0.1);
    color: var(--primary);
}

.nav-icon {
    font-size: 1.125rem;
}

.nav-text {
    font-weight: 500;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content-center;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    z-index: 999;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    color: white;
}

.toast {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
}

.faq-category-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: left;
    transition: all var(--transition-base);
}

.faq-category-btn:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.faq-category-btn.active {
    border-color: var(--primary);
    background: rgba(26, 54, 93, 0.05);
}

.breadcrumb-section {
    background: var(--bg-body);
}

.loading-skeleton {
    background: linear-gradient(90deg, var(--border-light) 25%, var(--border-color) 50%, var(--border-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.w-16 { width: 64px !important; }
.h-16 { height: 64px !important; }
.w-20 { width: 80px !important; }
.h-20 { height: 80px !important; }
.w-12 { width: 48px !important; }
.h-12 { height: 48px !important; }
.w-10 { width: 40px !important; }
.h-10 { height: 40px !important; }

.min-vh-75 {
    min-height: 75vh;
}

.max-w-xl {
    max-width: 36rem;
}

@media (max-width: 991.98px) {
    .main-content {
        padding-top: 0;
    }
    
    .filter-sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }
}

@media (max-width: 767.98px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .stats-section, .features-section, .how-it-works-section {
        padding: 3rem 0;
    }
    
    .floating-card {
        display: none;
    }
}

@media print {
    .main-header,
    .main-footer,
    .breadcrumb-section,
    .back-to-top,
    .btn,
    .sidebar {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
