/* WinBids — bids page v2
   Loaded after main.css so these rules win. Kept in its own file because
   nginx serves /static/ with a one-year immutable cache. */

.bids-page { padding: 28px 0 80px; }

/* ---------- Page head ---------- */
.bids-head {
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 18px;
}
.bids-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.15;
}
.bids-sub { font-size: 14px; color: var(--stone); margin-top: 5px; }

.bids-stats {
    gap: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 4px;
    box-shadow: 0 1px 2px rgba(28, 25, 23, 0.03);
}
.stat-center { padding: 0 22px; text-align: left; }
.stat-num-lg {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--ink);
    line-height: 1.2;
}
.stat-label-sm {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--stone);
    margin-top: 1px;
    text-transform: uppercase;
}
.stat-divider { height: 30px; background: var(--line); }

/* ---------- Toolbar ---------- */
.toolbar-card {
    border-radius: 14px;
    padding: 14px 14px 10px;
    margin-bottom: 14px;
    box-shadow: 0 1px 2px rgba(28, 25, 23, 0.03);
}
.search-form { margin-bottom: 10px; }
.search-row { gap: 8px; }
.search-row .search-input {
    height: 46px;
    padding: 0 16px 0 40px;
    font-size: 14.5px;
    border-radius: 10px;
    background: var(--paper);
    border-color: var(--line);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 15px center;
}
.search-row .search-input:focus {
    border-color: #a8a29e;
    box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.06);
}
.search-row .btn-primary {
    height: 46px;
    padding: 0 22px;
    border-radius: 10px;
    font-size: 14px;
}

.toolbar-row { gap: 8px; row-gap: 10px; }
.seg-tabs { background: var(--canvas); border: 1px solid var(--line); padding: 3px; border-radius: 10px; }
.seg-tab { padding: 6px 13px; font-size: 13.5px; border-radius: 7px; }
.seg-tab.active { color: var(--ink); box-shadow: 0 1px 3px rgba(28, 25, 23, 0.09); }
.dropdown-btn { padding: 7px 11px; border-radius: 8px; font-size: 13.5px; }
.dropdown-btn:hover { background: var(--canvas); }

/* Scope switch: All / Federal / State & local */
.scope-tabs {
    display: inline-flex;
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}
.scope-tab {
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--stone);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.scope-tab:hover { color: var(--ink); }
.scope-tab.active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(28, 25, 23, 0.1); }

.results-line {
    font-size: 12.5px;
    color: var(--stone);
    margin-left: 2px;
    white-space: nowrap;
}
.results-line strong { color: var(--ink); font-weight: 700; }
.results-inc { color: #a8a29e; }

/* ---------- Bid cards ---------- */
.bid-list { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }

.bid-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 13px;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.bid-card:hover {
    border-color: #d6d3d1;
    box-shadow: 0 4px 14px -6px rgba(28, 25, 23, 0.14);
    transform: translateY(-1px);
}
.bid-card-link {
    display: flex;
    align-items: stretch;
    gap: 20px;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
}
.bid-card-main { flex: 1; min-width: 0; }

.bid-card-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bid-card-title {
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -0.15px;
    line-height: 1.38;
    color: var(--ink);
}
.new-badge {
    flex: none;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 1px 7px;
    border-radius: 999px;
    position: relative;
    top: -1px;
}

.bid-card-summary {
    margin-top: 3px;
    font-size: 13.5px;
    line-height: 1.45;
    color: #57534e;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bid-card-agency {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--stone);
}
.agency-name { color: #44403c; font-weight: 600; }
.agency-loc { display: inline-flex; align-items: center; gap: 6px; }
.agency-loc::before { content: "·"; color: #d6d3d1; }

.bid-card-category { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.cat-tag {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #57534e;
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 2px 7px;
}
.federal-tag { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.cat-naics { text-transform: none; letter-spacing: 0; color: #78716c; }

.bid-card-side {
    flex: none;
    width: 178px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    border-left: 1px solid #f5f5f4;
    padding-left: 18px;
    text-align: right;
}
.due-block { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.due-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a8a29e;
}
.due-date { font-size: 13px; font-weight: 700; color: #44403c; line-height: 1.35; }
.posted-line { font-size: 10.5px; color: #a8a29e; }
.card-arrow {
    font-size: 16px;
    color: #d6d3d1;
    line-height: 1;
    transition: color 0.15s, transform 0.15s;
}
.bid-card:hover .card-arrow { color: var(--ink); transform: translateX(2px); }

/* ---------- Pagination / empty state ---------- */
.pagination { display: flex; justify-content: center; gap: 5px; margin: 26px 0 8px; flex-wrap: wrap; }
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: #57534e;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.page-link:hover { border-color: #a8a29e; color: var(--ink); }
.page-link.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.empty-state {
    background: var(--paper);
    border: 1px dashed var(--line);
    border-radius: 14px;
    padding: 42px 20px;
    text-align: center;
    color: var(--stone);
    margin-top: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .bids-head { align-items: flex-start; flex-direction: column; }
    .bids-stats { width: 100%; justify-content: space-around; }
    .stat-center { padding: 0 12px; }
    .bid-card-link { gap: 14px; padding: 14px 16px; }
    .bid-card-side {
        width: auto;
        border-left: none;
        border-top: 1px solid #f5f5f4;
        padding-left: 0;
        margin-top: 10px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }
    .bid-card-link { flex-direction: column; }
    .bid-card-side { width: 100%; }
    .due-block { align-items: flex-start; }
    .filters-panel { min-width: 0; width: calc(100vw - 44px); max-width: 420px; }
}
