/* ==================== */
/* CSS Variables        */
/* ==================== */

:root {
    --primary-color: #307E84;
    --primary-dark: #0A4A4E;
    --secondary-color: #00a3e0;
    --accent-color: #ff6b35;

    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;

    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;

    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --transition: all 0.3s ease;
}

/* ==================== */
/* Reset & Base Styles  */
/* ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -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-secondary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 0 24px;
    width: 100%;
}

/* ==================== */
/* Header               */
/* ==================== */

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 10px 0;
    box-shadow: var(--shadow-md);
}

.logo {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-image {
    height: 70px;
    width: auto;
    display: block;
}

.subtitle {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 300;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.language-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.language-toggle:active {
    transform: translateY(0);
}

.language-toggle svg {
    flex-shrink: 0;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(220, 53, 69, 0.8);
    border-color: rgba(220, 53, 69, 0.9);
    transform: translateY(-1px);
}

/* ==================== */
/* Main Content         */
/* ==================== */

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

/* ==================== */
/* Filters Section      */
/* ==================== */

.filters-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.search-container {
    position: relative;
    margin-bottom: 24px;
}

.search-input {
    width: 100%;
    padding: 16px 48px 16px 20px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.filter-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.filter-item label,
.filter-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Amount Range Slider */
.filter-group-amount {
    grid-column: 1 / -1;
}

.amount-range-container {
    width: 100%;
}

.amount-range-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.amount-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    padding: 6px 12px;
    background: rgba(48, 126, 132, 0.1);
    border-radius: var(--radius-sm);
    min-width: 80px;
    text-align: center;
}

.amount-separator {
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0 8px;
}

.range-slider-wrapper {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
}

.range-slider-track {
    position: absolute;
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    top: 50%;
    transform: translateY(-50%);
}

.range-slider-range {
    position: absolute;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 3px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    left: 0%;
    width: 100%;
}

.range-slider {
    position: absolute;
    width: 100%;
    height: 6px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(48, 126, 132, 0.3);
}

.range-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
    border-width: 4px;
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.range-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(48, 126, 132, 0.3);
}

.range-slider::-moz-range-thumb:active {
    transform: scale(1.1);
    border-width: 4px;
}

.range-slider-min {
    z-index: 2;
}

.range-slider-max {
    z-index: 2;
}

/* Multiattributaire Filter Buttons */
.multiatt-filter-group {
    grid-column: 1 / -1;
}

.multiatt-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.multiatt-btn {
    flex: 1;
    min-width: 120px;
    padding: 16px 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    color: var(--text-primary);
}

.multiatt-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.multiatt-btn.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(48, 126, 132, 0.1) 0%, rgba(10, 74, 78, 0.05) 100%);
    box-shadow: 0 0 0 3px rgba(48, 126, 132, 0.15);
}

.multiatt-btn svg {
    color: var(--text-secondary);
    transition: var(--transition);
}

.multiatt-btn.active svg {
    color: var(--primary-color);
}

.multiatt-btn span {
    font-size: 14px;
    font-weight: 600;
}

.multiatt-btn.active span {
    color: var(--primary-color);
}

/* GPO Filter Buttons */
.gpo-filter-group {
    grid-column: 1 / -1;
}

.gpo-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gpo-btn {
    flex: 1;
    min-width: 100px;
    max-width: 180px;
    height: 80px;
    padding: 12px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gpo-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.gpo-btn.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(48, 126, 132, 0.1) 0%, rgba(10, 74, 78, 0.05) 100%);
    box-shadow: 0 0 0 3px rgba(48, 126, 132, 0.15);
}

.gpo-btn.active::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.gpo-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gpo-btn-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.gpo-btn.active .gpo-btn-text {
    color: var(--primary-color);
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

#resultCount {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-reset {
    padding: 10px 20px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    font-family: inherit;
}

.btn-reset:hover {
    background-color: var(--border-color);
}

/* ==================== */
/* Products Grid        */
/* ==================== */

.products-section {
    min-height: 400px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--bg-secondary);
}

.product-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 48px;
    font-weight: 700;
}

.product-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-company {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.company-logo {
    height: 20px;
    width: auto;
    object-fit: contain;
}

.product-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.product-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.product-badge.category {
    background-color: #e3f2fd;
    color: #1976d2;
}

.product-badge.therapy {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.product-badge.region {
    background-color: #fff3e0;
    color: #e65100;
}

.product-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.product-keywords {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.product-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-view svg {
    width: 16px;
    height: 16px;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background-color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==================== */
/* No Results           */
/* ==================== */

.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.no-results svg {
    margin-bottom: 24px;
    opacity: 0.3;
}

.no-results h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.no-results p {
    font-size: 16px;
}

/* ==================== */
/* Results Header       */
/* ==================== */

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
}

.btn-export {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    font-family: inherit;
}

.btn-export:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-export:hover svg {
    stroke: var(--primary-color);
}

.btn-export svg {
    stroke: var(--text-secondary);
    transition: var(--transition);
}

/* ==================== */
/* Loading              */
/* ==================== */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ==================== */
/* Footer               */
/* ==================== */

.footer {
    background-color: var(--text-primary);
    color: white;
    padding: 24px 0;
    text-align: center;
    font-size: 14px;
    margin-top: auto;
}

/* ==================== */
/* Responsive Design    */
/* ==================== */

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .logo {
        font-size: 36px;
    }

    .logo-image {
        height: 48px;
    }

    .subtitle {
        font-size: 16px;
    }

    .filters-section {
        padding: 24px 16px;
    }

    .filter-group {
        grid-template-columns: 1fr;
    }

    .gpo-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .gpo-btn {
        max-width: none;
        width: 100%;
        height: 60px;
        min-width: unset;
        padding: 8px;
    }

    .gpo-btn:first-child {
        grid-column: 1 / -1;
        height: 50px;
    }

    .gpo-logo {
        max-height: 40px;
    }

    .gpo-btn-text {
        font-size: 13px;
    }

    .gpo-btn.active::after {
        width: 16px;
        height: 16px;
        font-size: 10px;
        top: 3px;
        right: 3px;
    }

    .multiatt-buttons {
        flex-direction: column;
    }

    .multiatt-btn {
        max-width: none;
        width: 100%;
    }

    .results-info {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .btn-reset {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 24px 0;
    }

    .logo {
        font-size: 32px;
    }

    .logo-image {
        height: 40px;
    }

    .main {
        padding: 24px 0;
    }

    /* GPO buttons for small mobile */
    .gpo-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .gpo-btn {
        height: 55px;
        padding: 6px;
    }

    .gpo-btn:first-child {
        grid-column: 1 / -1;
        height: 44px;
    }

    .gpo-logo {
        max-height: 35px;
    }

    .gpo-btn-text {
        font-size: 12px;
    }

    .gpo-btn.active::after {
        width: 14px;
        height: 14px;
        font-size: 8px;
        top: 2px;
        right: 2px;
    }
}

/* ==================== */
/* Stats Overview       */
/* ==================== */

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.stat-icon-success {
    background: linear-gradient(135deg, #FDC300 0%, #E6B000 100%);
}

.stat-icon-info {
    background: linear-gradient(135deg, #075289 0%, #053d6a 100%);
}

.stat-icon-warning {
    background: linear-gradient(135deg, #BB7702 0%, #9a6201 100%);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ==================== */
/* Tender Cards         */
/* ==================== */

.tenders-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.tender-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    transition: var(--transition);
    cursor: pointer;
    width: 100%;
}

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

.tender-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

.tender-title-section {
    flex: 1;
}

.tender-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
    /* Limiter à 2 lignes avec ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em; /* 2 lignes * 1.4 line-height */
    cursor: help; /* Indique qu'il y a un tooltip */
    word-break: break-word;
}

.tender-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tender-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-gpo {
    background: #eff6ff;
    color: #1e40af;
}

.badge-gpo.uniha {
    background: #dbeafe;
    color: #1e40af;
}

.badge-gpo.ugap {
    background: #d1fae5;
    color: #065f46;
}

.badge-gpo.resah {
    background: #fed7aa;
    color: #92400e;
}

.badge-gpo.ap-hp {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-market-number {
    background: #f3f4f6;
    color: #374151;
    font-family: 'Courier New', monospace;
}

.badge-type {
    background: #f5f3ff;
    color: #6d28d9;
}

.badge-multiattributaire {
    font-weight: 600;
    font-size: 12px;
}

.badge-multi-low {
    background: #d1fae5;
    color: #065f46;
}

.badge-multi-medium {
    background: #fef3c7;
    color: #92400e;
}

.badge-multi-high {
    background: #fee2e2;
    color: #991b1b;
}

.tender-winner {
    flex-shrink: 0;
    text-align: right;
}

.winner-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.winner-name {
    font-size: 16px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    display: inline-block;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.winner-stryker {
    background: linear-gradient(135deg, #FDC300 0%, #E6B000 100%);
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(253, 195, 0, 0.3);
}

.winner-other {
    background: #f9fafb;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.tender-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.tender-amount-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tender-amount {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(48, 126, 132, 0.1);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.tender-amount.amount-not-available {
    color: #6b7280;
    background: #f3f4f6;
    font-weight: 500;
    font-size: 14px;
}

.tender-date-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tender-date {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.tender-duration {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.btn-view-tender {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.btn-view-tender:hover {
    background: var(--primary-dark);
    transform: translateX(4px);
}

.btn-analytics,
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
}

.btn-analytics:hover,
.btn-back:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.btn-analytics:active,
.btn-back:active {
    transform: translateY(0);
}

.btn-back svg {
    flex-shrink: 0;
}

/* ==================== */
/* Responsive Adjustments */
/* ==================== */

@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .tender-header {
        flex-direction: column;
    }

    .tender-winner {
        text-align: left;
        width: 100%;
    }

    .winner-name {
        display: block;
        text-align: center;
        max-width: 100%;
    }

    .tender-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 24px;
    }
}

/* ==================== Infinite Scroll Loader ==================== */

.infinite-scroll-loader {
    width: 100%;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.loader-content {
    text-align: center;
}

.spinner-small {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 4px solid rgba(48, 126, 132, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.infinite-scroll-loader p {
    margin: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.loader-stats {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 600;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
