﻿:root {
    --primary: #1d9455;
    --primary-hover: #172554;
    --success: #16a34a;
    --danger: #dc2626;
    --gray-light: #f8fafc;
    --gray-border: #e2e8f0;
    --text-dark: #334155;
    --text-muted: #64748b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tender-container {
    background-color: #f1f5f9;
    color: var(--text-dark);
    padding: 2rem 1rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

header {
    margin-bottom: 2rem;
    text-align: center;
}

    header h1 {
        color: var(--primary);
        font-size: 2.2rem;
        margin-bottom: 0.5rem;
    }

    header p {
        color: var(--text-muted);
    }

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.search-box {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-border);
    border-radius: 4px;
    width: 300px;
    font-size: 0.95rem;
}

.status-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--gray-border);
    vertical-align: top;
}

tr:hover {
    background-color: var(--gray-light);
}

.tender-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}

.tender-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: 450px;
}

.date-badge {
    display: block;
    font-size: 0.85rem;
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

    .date-badge strong {
        color: #475569;
    }

.date-open {
    color: var(--success);
}

.date-close {
    color: var(--danger);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
}

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

    .btn-download svg {
        margin-right: 0.5rem;
        width: 16px;
        height: 16px;
        fill: currentColor;
    }

.status-pill {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background-color: #dcfce7;
    color: #15803d;
}

/* Mobile responsive stacked configuration elements */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .search-box {
        width: 100%;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

        thead tr {
            position: absolute;
            top: -9999px;
            left: -9999px;
        }

    tr {
        border: 1px solid var(--gray-border);
        margin-bottom: 1rem;
        border-radius: 6px;
        background: white;
        padding: 0.5rem;
    }

    td {
        border: none;
        border-bottom: 1px dashed #e2e8f0;
        position: relative;
        padding-left: 50%;
        white-space: normal;
    }

        td:last-child {
            border-bottom: none;
        }

        td:before {
            position: absolute;
            top: 1.2rem;
            left: 1rem;
            width: 45%;
            padding-right: 10px;
            white-space: nowrap;
            font-weight: 600;
            color: var(--text-muted);
            font-size: 0.85rem;
        }

        td:nth-of-type(1):before {
            content: "Tender Details";
        }

        td:nth-of-type(2):before {
            content: "Timeline";
        }

        td:nth-of-type(3):before {
            content: "Status";
        }

        td:nth-of-type(4):before {
            content: "Action";
        }

    .tender-desc {
        max-width: 100%;
    }
}
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    gap: 0.5rem;
}

.page-btn {
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--gray-border);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .page-btn:hover:not(:disabled) {
        background-color: var(--gray-light);
        border-color: var(--primary);
    }

    .page-btn:disabled {
        color: var(--text-muted);
        background-color: #e2e8f0;
        cursor: not-allowed;
        border-color: var(--gray-border);
    }

.page-numbers-group {
    display: flex;
    gap: 0.35rem;
}

.page-num {
    background-color: white;
    color: var(--text-dark);
    border: 1px solid var(--gray-border);
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .page-num:hover {
        background-color: var(--gray-light);
    }

    .page-num.active {
        background-color: var(--primary);
        color: white;
        border-color: var(--primary);
    }

/* Ensure pagination elements look good on small displays */
@media (max-width: 480px) {
    .pagination-container {
        flex-wrap: wrap;
    }

    .page-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
}