/* ── Prozorro Viewer — доповнення до UIkit ───────────────────────────────── */

/* ── List wrapper ─────────────────────────────────────────────────────────── */

.pv-list { margin: 1.5em 0; }

/* ── Controls bar ─────────────────────────────────────────────────────────── */

.pv-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

/* UIkit subnav overrides */
.pv-type-tabs { margin: 0 !important; }

.pv-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 5px;
    background: rgba(0,0,0,.1);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 4px;
    vertical-align: middle;
}

.uk-subnav-pill > .uk-active > a .pv-tab-count {
    background: rgba(255,255,255,.3);
}

/* ── Year filter ──────────────────────────────────────────────────────────── */

.pv-year-filter {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.pv-year-btn {
    padding: 4px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all .15s;
    line-height: 1.5;
}

.pv-year-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.pv-year-btn.uk-active {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
}

/* ── Grid ─────────────────────────────────────────────────────────────────── */

.pv-grid { align-items: stretch; }

/* ── Pagination bar ───────────────────────────────────────────────────────── */

.pv-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.pv-pagination-info {
    font-size: 13px;
    color: #9ca3af;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */

.pv-card {
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow .18s, border-color .18s;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.pv-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.1) !important;
    border-color: #c3d4f0;
}

.pv-card-body {
    flex: 1;
    padding: 18px 20px 12px !important;
}

/* ── Badges ───────────────────────────────────────────────────────────────── */

.pv-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pv-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.6;
}

.pv-badge-cpv      { background: #1e3a5f; color: #fff; }
.pv-badge-active   { background: #d3f9d8; color: #2b8a3e; }
.pv-badge-complete { background: #e9ecef; color: #495057; }
.pv-badge-draft    { background: #fff3bf; color: #856404; }
.pv-badge-cancelled{ background: #ffe3e3; color: #c92a2a; }
.pv-badge-plan     { background: #dbe8ff; color: #1971c2; }
.pv-badge-tender   { background: #d3f9d8; color: #2b8a3e; }

/* ── Card title ───────────────────────────────────────────────────────────── */

.pv-card-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    color: #1a1f2e !important;
    margin: 10px 0 4px !important;
}

/* ── ID line ──────────────────────────────────────────────────────────────── */

.pv-card-id {
    font-size: 11px;
    color: #9ca3af;
    margin: 0 0 8px;
    font-family: monospace;
}

/* ── Budget ───────────────────────────────────────────────────────────────── */

.pv-budget-value {
    font-size: 16px;
    font-weight: 700;
    color: #1d6f42;
    margin: 6px 0 4px;
}

/* ── Buyer ────────────────────────────────────────────────────────────────── */

.pv-card-buyer {
    font-size: 12px !important;
    color: #6b7280 !important;
    margin: 4px 0 0 !important;
    line-height: 1.4 !important;
}

/* ── Card footer ──────────────────────────────────────────────────────────── */

.pv-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px !important;
    border-top: 1px solid #f0f0f0;
}

.pv-items-count {
    font-size: 11px;
    color: #9ca3af;
}

.pv-more-hint {
    font-size: 12px;
    font-weight: 600;
    color: #3b82f6;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ── Modal ────────────────────────────────────────────────────────────────── */

.pv-modal-dialog {
    max-width: 780px !important;
    width: 100%;
    border-radius: 8px;
    padding: 36px !important;
}

.pv-modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.pv-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1f2e;
    line-height: 1.35;
    margin: 0 0 24px;
}

/* ── Modal sections ───────────────────────────────────────────────────────── */

.pv-modal-section {
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.pv-modal-section:last-of-type { border-bottom: none; }

.pv-modal-section-head {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9ca3af;
    font-weight: 700;
    margin-bottom: 4px;
}

.pv-modal-section-body {
    color: #374151;
    line-height: 1.65;
    margin: 0;
    white-space: pre-wrap;
}

.pv-modal-budget {
    font-size: 20px;
    font-weight: 700;
    color: #1d6f42;
    margin: 0;
}

/* ── Modal items table ────────────────────────────────────────────────────── */

.pv-modal-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 6px;
}

.pv-modal-items-table th {
    text-align: left;
    padding: 7px 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    font-weight: 600;
    font-size: 12px;
}

.pv-modal-items-table td {
    padding: 7px 10px;
    border: 1px solid #e5e7eb;
    color: #374151;
    vertical-align: top;
}

.pv-modal-items-table tr:hover td { background: #f9fafb; }

/* ── Modal footer ─────────────────────────────────────────────────────────── */

.pv-modal-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.pv-prozorro-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #1e87f0;
    text-decoration: none;
}

.pv-prozorro-link:hover {
    text-decoration: underline;
}

/* ── Error ────────────────────────────────────────────────────────────────── */

.pv-card-error {
    font-size: 13px;
}

/* ── Empty ────────────────────────────────────────────────────────────────── */

.pv-empty {
    text-align: center;
    padding: 48px 20px;
    color: #9ca3af;
    font-size: 15px;
}
