/* ─── Tender Management – Frontend Styles ────────────────────────────────── */

.tm-tenders {
    font-family: inherit;
    font-size: 15px;
    margin: 0 0 2em;
}

/* Table */
.tm-tender-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.tm-tender-table thead th {
    background: #f5f5f5;
    padding: 12px 14px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #ddd;
}

.tm-tender-table tbody tr:nth-child(even) { background: #fafafa; }

.tm-tender-table tbody tr:hover { background: #f0f7ff; }

.tm-tender-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: top;
    line-height: 1.5;
}

.tm-tender-table td a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 600;
}

.tm-tender-table td a:hover { text-decoration: underline; }

/* Column widths */
.tm-col-ref     { width: 15%; white-space: nowrap; }
.tm-col-title   { width: 35%; }
.tm-col-closing { width: 14%; white-space: nowrap; }
.tm-col-docs    { width: 20%; }

/* Status badges */
.tm-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.tm-badge-current   { background: #e8f4fd; color: #1d72aa; }
.tm-badge-awarded   { background: #edfaef; color: #1e7730; }
.tm-badge-cancelled { background: #fde8e8; color: #b32d2e; }
.tm-badge-received  { background: #fef8e8; color: #9a6700; }

/* Date colours */
.tm-date-future { color: #1e7730; font-weight: 600; }
.tm-date-past   { color: #b32d2e; }

/* Expired row dim */
.tm-expired { opacity: 0.65; }

/* Document links */
.tm-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #2271b1;
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.3;
}

.tm-doc-link:hover { text-decoration: underline; }

.tm-doc-link svg {
    flex-shrink: 0;
    fill: currentColor;
}

/* No results */
.tm-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
    border: 1px dashed #ddd;
    border-radius: 4px;
}

/* Pagination */
.tm-pagination {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.tm-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    color: #2271b1;
    text-decoration: none;
    transition: background 0.15s;
}

.tm-pagination .page-numbers:hover { background: #f0f7ff; }

.tm-pagination .page-numbers.current {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .tm-tender-table { display: block; overflow-x: auto; }
    .tm-tender-table thead { display: none; }
    .tm-tender-table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        padding: 8px;
    }
    .tm-tender-table td {
        display: flex;
        gap: 8px;
        border-bottom: 1px solid #f0f0f0;
        padding: 8px 6px;
        font-size: 14px;
    }
    .tm-tender-table td::before {
        content: attr(data-label);
        font-weight: 700;
        min-width: 120px;
        color: #555;
        flex-shrink: 0;
    }
}
