:root {
    --primary: #315f4b;
    --primary-dark: #243f34;
    --primary-soft: #e8f0eb;
    --accent: #d7a126;
    --accent-dark: #a97400;
    --ink: #202a26;
    --muted: #66726c;
    --bg: #f4f6f4;
    --line: #dde4df;
    --surface: #ffffff;
    --danger: #a43b36;
    --success: #2f6d48;
    --bs-primary: #315f4b;
    --bs-primary-rgb: 49, 95, 75;
    --bs-link-color: #315f4b;
    --bs-link-hover-color: #243f34;
    --bs-focus-ring-color: rgba(49, 95, 75, .22);
}

html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

.app-shell { max-width: 1540px; padding-left: 24px; padding-right: 24px; }
.app-navbar {
    background: linear-gradient(105deg, #1f3029, #315f4b);
    box-shadow: 0 3px 16px rgba(31, 48, 41, .2);
}
.navbar-brand { font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--accent);
    color: #1e241f;
}
.navbar-nav .nav-link { color: rgba(255,255,255,.82); font-size: .92rem; padding-left: .65rem; padding-right: .65rem; }
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: #fff; }
.navbar-nav .nav-link.active { font-weight: 700; }
.navbar-text { color: rgba(255,255,255,.78) !important; }

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #1d352b;
    --bs-btn-active-border-color: #1d352b;
    --bs-btn-disabled-bg: var(--primary);
    --bs-btn-disabled-border-color: var(--primary);
}
.btn-outline-primary {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
}
.btn-warning {
    --bs-btn-color: #22271f;
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: #181c18;
    --bs-btn-hover-bg: #e2b13d;
    --bs-btn-hover-border-color: #e2b13d;
}
.btn-link { color: var(--primary); }
.btn-link:hover { color: var(--primary-dark); }
.link-primary { color: var(--primary) !important; }
.link-primary:hover { color: var(--primary-dark) !important; }
.text-bg-primary { background-color: var(--primary) !important; color: #fff !important; }
.bg-primary { background-color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }
.form-control:focus,
.form-select:focus,
.form-check-input:focus { border-color: #739281; box-shadow: 0 0 0 .25rem rgba(49,95,75,.16); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

.hero-section {
    background: radial-gradient(circle at 88% 16%, rgba(215,161,38,.19), transparent 30%), linear-gradient(180deg, #fff, #f3f6f4);
    border-bottom: 1px solid var(--line);
}
.page-hero { background: linear-gradient(180deg, #fff, #eef3ef); border-bottom: 1px solid var(--line); }
.py-lg-6 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
.eyebrow,
.section-kicker {
    text-transform: uppercase;
    letter-spacing: .09em;
    font-size: .76rem;
    font-weight: 800;
    color: var(--primary);
}
.section-kicker-light { color: #eacb7b; }
.section-heading { max-width: 760px; }
.hero-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
}
.hero-panel-head { display: flex; align-items: center; gap: 9px; font-size: .83rem; font-weight: 700; color: var(--muted); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #3e8b5d; box-shadow: 0 0 0 5px rgba(62,139,93,.12); }
.stat-tile { background: #f7f9f7; border: 1px solid var(--line); border-radius: 16px; padding: 18px; height: 100%; }
.stat-tile span { display: block; color: var(--muted); font-size: .82rem; }
.stat-tile strong { display: block; font-size: 1.8rem; margin-top: 6px; color: var(--primary-dark); }
.popular-searches { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--muted); font-size: .84rem; }
.popular-searches a { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.7); text-decoration: none; }

.info-card,
.content-card,
.filter-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
}
.info-card { padding: 26px; }
.info-card p { color: var(--muted); margin-bottom: 0; }
.info-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 800; margin-bottom: 18px; }
.section-soft { background: #eaf0ec; border-top: 1px solid #dce5df; border-bottom: 1px solid #dce5df; }
.section-dark { background: #243c32; color: #fff; }
.section-dark p { color: rgba(255,255,255,.75); }
.feature-list { padding-left: 0; list-style: none; }
.feature-list li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 900; }
.section-dark .feature-list li::before { color: #eacb7b; }
.alert-preview { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: 0 18px 40px rgba(31,48,41,.08); }
.alert-preview-top { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.alert-preview-top > i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: #222; font-size: 1.1rem; }
.alert-preview-top span { display: block; color: var(--muted); font-size: .8rem; }
.alert-preview-row { display: grid; grid-template-columns: 105px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.alert-preview-row:last-child { border-bottom: 0; padding-bottom: 0; }
.alert-preview-row small { display: block; color: var(--muted); margin-top: 4px; }
.match-badge { align-self: start; text-align: center; border-radius: 999px; padding: 5px 9px; background: var(--primary-soft); color: var(--primary-dark); font-size: .72rem; font-weight: 700; }

.proc-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; transition: .2s ease; }
.proc-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(31,48,41,.09); }
.proc-card h3 a { color: var(--ink); text-decoration: none; }
.proc-card h3 a:hover { color: var(--primary); }
.proc-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .75rem; }
.filter-card { position: sticky; top: 86px; }
.empty-state { padding: 42px; text-align: center; background: #fff; border: 1px dashed #b9c6bd; border-radius: 16px; color: var(--muted); }
.badge-status-active { background: #dff1e5; color: #235d3b; }
.badge-status-expired { background: #e7ebe8; color: #53615a; }
.badge-status-cancelled { background: #f5dddd; color: #8a312d; }
.detail-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }

.legal-content { max-width: 1180px; }
.legal-content h2 { font-size: 1.35rem; margin-top: 2rem; margin-bottom: .75rem; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: 1.05rem; margin-top: 1.4rem; }
.legal-content p,
.legal-content li { line-height: 1.72; color: #44504a; }
.contact-detail { display: flex; gap: 13px; align-items: flex-start; }
.contact-detail > i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.message-body { white-space: normal; color: #3f4a45; line-height: 1.65; }

.faq-accordion .accordion-item { border-color: var(--line); }
.faq-accordion .accordion-button:not(.collapsed) { color: var(--primary-dark); background: var(--primary-soft); box-shadow: none; }
.faq-accordion .accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(49,95,75,.14); }

.app-footer { background: #e6ece8; color: #4f5e56; font-size: .88rem; border-top: 1px solid #d8e0da; }
.footer-brand { font-size: 1.35rem; font-weight: 850; color: var(--primary-dark); }
.footer-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #36483f; font-weight: 800; }
.app-footer a,
.footer-link-button { display: block; width: fit-content; margin: 7px 0; color: #4a5a52; text-decoration: none; background: none; border: 0; padding: 0; text-align: left; font: inherit; }
.app-footer a:hover,
.footer-link-button:hover { color: var(--primary-dark); text-decoration: underline; }
.footer-credit { font-weight: 700; }

.cookie-consent[hidden] { display: none !important; }
.cookie-consent { position: fixed; inset: auto 16px 16px 16px; z-index: 1090; display: flex; justify-content: center; }
.cookie-card { width: min(1120px, 100%); background: #fff; border: 1px solid #cfd9d2; border-radius: 18px; box-shadow: 0 18px 55px rgba(24,39,32,.22); padding: 20px; }
.cookie-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cookie-summary p { color: var(--muted); max-width: 700px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; flex-shrink: 0; }
.cookie-details { max-width: 820px; margin: 0 auto; }
.cookie-option { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.cookie-option p { color: var(--muted); margin: 4px 0 0; font-size: .86rem; }

.admin-body { background: #f2f5f3; }
.admin-sidebar { min-height: calc(100vh - 59px); background: #fff; border-right: 1px solid var(--line); }
.admin-sidebar .nav-link { color: #3d4b44; border-radius: 9px; }
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active { background: var(--primary-soft); color: var(--primary-dark); }
.admin-sidebar .nav-link.active { font-weight: 700; }
.admin-sidebar i { width: 22px; display: inline-block; }
.health-card { display: flex; gap: 13px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; height: 100%; }
.health-card .health-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: 0 0 42px; }
.health-card span { display: block; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.health-card strong { display: block; margin-top: 2px; }
.health-card small { color: var(--muted); }
.health-ok .health-icon { background: #e2f1e7; color: var(--success); }
.health-alert .health-icon { background: #f7e6d0; color: #9a6500; }
.monitor-list > div { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.monitor-list > div:last-child { border-bottom: 0; }
.admin-status-form { width: 210px; flex: 0 0 210px; }
.admin-report-form { width: 320px; flex: 0 0 320px; }

.table thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: #68756e; background: #f7f9f7; }
.form-label { font-weight: 650; }
.pagination .page-link { color: var(--primary); }
.pagination .active > .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.alert-info { --bs-alert-color: #29483a; --bs-alert-bg: #e8f0eb; --bs-alert-border-color: #cadbcf; }

@media (max-width: 1199.98px) {
    .navbar-collapse { padding-top: 12px; }
    .nav-actions { padding: 10px 0 4px; }
}
@media (max-width: 991.98px) {
    .filter-card { position: static; }
    .admin-sidebar { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .py-lg-6 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
    .admin-status-form,
    .admin-report-form { width: 100%; flex-basis: auto; }
}
@media (max-width: 767.98px) {
    .app-shell { padding-left: 14px; padding-right: 14px; }
    .cookie-consent { inset: auto 8px 8px 8px; }
    .cookie-card { padding: 16px; max-height: 88vh; overflow-y: auto; }
    .cookie-summary { align-items: stretch; flex-direction: column; }
    .cookie-actions { justify-content: stretch; }
    .cookie-actions .btn { flex: 1 1 100%; }
    .alert-preview-row { grid-template-columns: 1fr; }
}

/* OPData 1.2 */
.brand-logo-wrap {
    background: #fff;
    border-radius: 10px;
    padding: 5px 8px;
    line-height: 1;
    flex: 0 0 auto;
}
.brand-logo {
    display: block;
    width: 142px;
    height: 34px;
    object-fit: contain;
}
.footer-logo {
    display: block;
    width: min(220px, 100%);
    height: auto;
}
.account-nav {
    border-left: 1px solid rgba(255,255,255,.18);
    padding-left: .45rem;
    margin-left: .25rem;
}
.filter-card-scroll {
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.filter-card-scroll::-webkit-scrollbar { width: 8px; }
.filter-card-scroll::-webkit-scrollbar-thumb { background: #b8c6bd; border-radius: 999px; }
.stat-tile-highlight {
    border-color: #e1c36f;
    background: #fff8e2;
}
.stat-tile-highlight strong { color: #7a5300; }
.procurement-result,
.proc-card { position: relative; overflow: hidden; }
.procurement-new { border-left: 5px solid #3e8b5d !important; }
.procurement-urgent { box-shadow: inset 0 0 0 1px rgba(215,161,38,.28); }
.procurement-high-value::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-top: 34px solid #243f34;
    border-left: 34px solid transparent;
}
.procurement-flag { display: inline-flex; align-items: center; gap: 5px; }
.flag-new { background: #dff1e5; color: #235d3b; }
.flag-today { background: #f8df9a; color: #6b4900; }
.flag-deadline { background: #fff1c8; color: #775300; }
.flag-high_value { background: #e7ebe8; color: #243f34; }
.region-map-card { min-height: 560px; }
.region-map { height: 520px; border-radius: 14px; background: #edf2ee; overflow: hidden; }
.region-map .leaflet-control-zoom a { color: var(--primary-dark); }
.region-map .leaflet-popup-content-wrapper { border-radius: 14px; }
.region-popup strong { display: block; font-size: 1rem; margin-bottom: 5px; }
.region-popup small { display: block; color: var(--muted); margin-top: 4px; }
.region-popup a { display: inline-block; margin-top: 10px; font-weight: 700; }
.region-list { display: grid; gap: 8px; max-height: 650px; overflow-y: auto; padding-right: 4px; }
.region-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: #fafcfb; }
.region-list a:hover { background: var(--primary-soft); border-color: #bfd0c4; }
.region-list small { display: block; color: var(--muted); font-size: .74rem; margin-top: 2px; }
.region-count { min-width: 46px; text-align: center; border-radius: 999px; padding: 5px 8px; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 800; }
.offcanvas { --bs-offcanvas-width: min(420px, 92vw); }

@media (max-width: 1399.98px) {
    .navbar-nav .nav-link { font-size: .86rem; padding-left: .48rem; padding-right: .48rem; }
    .brand-logo { width: 126px; height: 31px; }
}
@media (max-width: 1199.98px) {
    .account-nav { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); padding: 10px 0 0; margin: 8px 0 0; }
    .brand-logo { width: 136px; }
}
@media (max-width: 767.98px) {
    .region-map-card { min-height: 420px; }
    .region-map { height: 390px; }
    .proc-value-block { border-top: 1px solid var(--line); padding-top: 12px; }
    .search-hero .input-group { display: grid; grid-template-columns: auto 1fr; }
    .search-hero .input-group .btn { grid-column: 1 / -1; border-radius: 0 0 .5rem .5rem; }
    .search-hero .input-group-text { border-radius: .5rem 0 0 0; }
    .search-hero .form-control { border-radius: 0 .5rem 0 0 !important; }
}
@media (max-width: 479.98px) {
    .brand-logo-wrap { padding: 4px 6px; }
    .brand-logo { width: 118px; height: 29px; }
    .hero-panel { padding: 16px; }
    .stat-tile { padding: 14px; }
    .stat-tile strong { font-size: 1.45rem; }
    .content-card { border-radius: 14px; }
    .region-map-card { padding: 4px !important; min-height: 350px; }
    .region-map { height: 340px; border-radius: 11px; }
}
.admin-brand-logo { width: 112px; height: 27px; }

/* OPData 1.3 */
.password-input-wrap { position: relative; }
.password-input-wrap .form-control { padding-right: 46px; }
.password-toggle {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #526159;
    cursor: pointer;
}
.password-toggle:hover,
.password-toggle:focus { background: var(--primary-soft); color: var(--primary-dark); outline: none; }
.password-strength-bar { height: 5px; border-radius: 999px; overflow: hidden; background: #e3e8e5; }
.password-strength-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: #a43b36; transition: width .18s ease, background .18s ease; }
.password-strength small { display: block; margin-top: 5px; color: #7d423e; }
.password-strength[data-level="medium"] .password-strength-bar span { background: #c38a15; }
.password-strength[data-level="medium"] small { color: #765100; }
.password-strength[data-level="strong"] .password-strength-bar span { background: #2f6d48; }
.password-strength[data-level="strong"] small { color: #2f6d48; }
.admin-page-shell { min-height: calc(100vh - 59px); }
.admin-footer { background: #e6ece8; border-top: 1px solid #d8e0da; color: #536158; }
.admin-footer a { color: var(--primary-dark); font-weight: 700; text-decoration: none; }
.admin-footer a:hover { text-decoration: underline; }
.error-log-message { max-width: 900px; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #5e2e2b; background: transparent; }

/* OPData 1.4 */
.region-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.region-grid a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; text-decoration: none; background: #fff; min-width: 0; }
.region-grid a:hover { background: var(--primary-soft); border-color: #bfd0c4; transform: translateY(-1px); }
.region-grid strong { display: block; color: var(--ink); }
.region-grid small { display: block; color: var(--muted); font-size: .72rem; margin-top: 3px; }
.region-map-label-wrap { background: transparent !important; border: 0 !important; }
.region-map-label { width: 92px; min-height: 42px; padding: 4px 7px; border: 1px solid rgba(255,255,255,.85); border-radius: 9px; background: rgba(36,63,52,.92); color: #fff; box-shadow: 0 3px 10px rgba(18,36,28,.22); line-height: 1.05; cursor: pointer; }
.region-map-label span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .61rem; font-weight: 650; }
.region-map-label strong { display: block; margin-top: 2px; font-size: .92rem; color: #fff; }
.region-map-label:hover, .region-map-label:focus { background: #d7a126; color: #1f2a25; outline: 0; }
.region-map-label:hover strong, .region-map-label:focus strong { color: #1f2a25; }
.entity-card { position: relative; transition: .2s ease; }
.entity-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(31,48,41,.09); }
.entity-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-size: 1.2rem; }
.entity-count { display: grid; place-items: center; min-width: 48px; height: 34px; padding: 0 10px; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 800; }
.entity-stats { min-width: min(100%, 520px); }
.admin-settings-grid > [class*="col-"] { display: flex; }
.admin-settings-grid .content-card { width: 100%; }
.error-log-message { white-space: pre-wrap; word-break: break-word; max-width: 900px; font-family: inherit; font-size: .78rem; }
@media (max-width: 1199.98px) { .region-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) {
    .region-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .region-map-label { width: 48px; min-height: 31px; padding: 3px; }
    .region-map-label span { display: none; }
    .region-map-label strong { margin: 0; font-size: .76rem; }
}
@media (max-width: 479.98px) { .region-grid { grid-template-columns: 1fr; } }
.region-list { max-height: none; overflow: visible; }

@media (max-width: 1199.98px) { .navbar-collapse { padding-top: 12px; } .nav-actions { padding: 10px 0 4px; } .account-nav { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); padding: 10px 0 0; margin: 8px 0 0; } }


/* OPData 1.5 */
.search-hero .input-group { flex-wrap: nowrap; }
.search-hero .form-control { min-width: 0; flex: 1 1 360px; }
.stat-tile-link { display: block; height: 100%; color: inherit; text-decoration: none; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.stat-tile-link small { display: block; margin-top: 8px; color: var(--muted); font-size: .72rem; font-weight: 650; }
.stat-tile-link:hover { color: inherit; transform: translateY(-2px); border-color: #aebfb4; box-shadow: 0 8px 20px rgba(36,63,52,.09); }
.urgent-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.urgent-card { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 16px; box-shadow: 0 6px 18px rgba(31,48,39,.05); }
.urgent-card-main { min-width: 0; }
.urgent-card h3 { margin: 10px 0 6px; overflow-wrap: anywhere; }
.urgent-card h3 a { color: var(--dark); text-decoration: none; }
.urgent-card p { color: var(--muted); font-size: .84rem; margin: 0; overflow-wrap: anywhere; }
.metric-card { display: flex; flex-direction: column; height: 100%; padding: 19px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: inherit; text-decoration: none; box-shadow: 0 6px 18px rgba(31,48,39,.04); }
.metric-card:hover { color: inherit; border-color: #aec1b5; transform: translateY(-2px); }
.metric-card span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 750; }
.metric-card strong { font-size: 1.8rem; margin-top: 7px; }
.metric-card small { color: var(--muted); margin-top: 3px; }
.value-stat-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.value-stat-list > div:last-child { border-bottom: 0; }
.chart-card { min-height: 390px; }
.chart-wrap { position: relative; height: 310px; }
.chart-wrap-sm { height: 300px; }
.faq-stats-card { background: #f4f8f5; border: 1px solid #d7e2da; border-radius: 18px; padding: 25px; }
.faq-stat-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.faq-stat-grid a { display: flex; flex-direction: column; padding: 15px; border-radius: 13px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: inherit; }
.faq-stat-grid a:hover { border-color: #adc0b4; }
.faq-stat-grid strong { font-size: 1.5rem; color: var(--primary-dark); }
.faq-stat-grid span { color: var(--muted); font-size: .78rem; }
.api-code { padding: 15px; border-radius: 12px; background: #202b26; color: #edf4ef; white-space: pre-wrap; overflow-wrap: anywhere; }
.api-side-card { top: 90px; }
.contact-map { display: block; width: 100%; height: 420px; border: 0; }
.copy-command { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9f7; }
.copy-command code { min-width: 0; flex: 1; overflow-wrap: anywhere; color: #2e4138; }

@media (max-width: 991.98px) {
    .search-hero .input-group { display: grid; grid-template-columns: auto minmax(0,1fr); }
    .search-hero .input-group .btn { grid-column: 1 / -1; width: 100%; border-radius: 0 0 .5rem .5rem; }
    .search-hero .input-group-text { border-radius: .5rem 0 0 0; }
    .search-hero .form-control { width: 100%; min-width: 0; border-radius: 0 .5rem 0 0 !important; }
    .urgent-grid { grid-template-columns: 1fr; }
    .api-side-card { position: static !important; }
}
@media (max-width: 575.98px) {
    .search-hero .input-group { font-size: 1rem; }
    .search-hero .form-control { font-size: 1rem; padding-left: .55rem; }
    .search-hero .input-group-text { padding-left: .8rem; padding-right: .55rem; }
    .urgent-card { align-items: stretch; flex-direction: column; }
    .urgent-card .btn { width: 100%; }
    .faq-stat-grid { grid-template-columns: 1fr 1fr; }
    .chart-card { min-height: 350px; padding: 16px !important; }
    .chart-wrap { height: 280px; }
    .value-stat-list > div { align-items: flex-start; flex-direction: column; gap: 3px; }
    .copy-command { align-items: stretch; flex-direction: column; }
    .contact-map { height: 330px; }
}

/* OPData 1.6 */
.app-nav-dropdown {
    min-width: 220px;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 16px 40px rgba(0,0,0,.22);
}
.app-nav-dropdown .dropdown-item {
    padding: .65rem .9rem;
}
.app-nav-dropdown .dropdown-item:hover,
.app-nav-dropdown .dropdown-item:focus,
.app-nav-dropdown .dropdown-item.active {
    background: #315f4b;
    color: #fff;
}


/* OPData 1.7 */
.nav-user-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    max-width: 220px;
    padding: .38rem .65rem;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    color: rgba(255,255,255,.9);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 650;
}
.nav-user-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-link:hover,
.nav-user-link.active { color: #fff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.35); }
.filter-card-wide { overflow: visible; }
.filter-advanced {
    border-top: 1px solid var(--line);
    padding-top: .8rem;
}
.filter-advanced summary {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--primary-dark);
    font-weight: 750;
    cursor: pointer;
    list-style: none;
}
.filter-advanced summary::-webkit-details-marker { display: none; }
.filter-advanced summary::after { content: "▾"; font-size: .8rem; transition: transform .2s ease; }
.filter-advanced[open] summary::after { transform: rotate(180deg); }
.result-legend .procurement-flag {
    text-decoration: none;
    border: 1px solid transparent;
    padding: .48rem .72rem;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.result-legend .procurement-flag:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(31,48,41,.12); }
.result-legend .procurement-flag.active { border-color: currentColor; box-shadow: 0 0 0 3px rgba(36,63,52,.08); }
.authority-autocomplete-wrap { z-index: 12; }
.authority-suggestions {
    position: absolute;
    z-index: 1080;
    top: calc(100% + 5px);
    left: calc(var(--bs-gutter-x) * .5);
    right: calc(var(--bs-gutter-x) * .5);
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(31,48,41,.16);
}
.authority-suggestion {
    display: block;
    width: 100%;
    padding: .72rem .85rem;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    text-align: left;
}
.authority-suggestion:last-child { border-bottom: 0; }
.authority-suggestion:hover,
.authority-suggestion:focus { background: var(--primary-soft); outline: 0; }
.authority-suggestion strong,
.authority-suggestion small { display: block; }
.authority-suggestion small { margin-top: .2rem; color: var(--muted); font-size: .75rem; }
.offcanvas .authority-suggestions { left: 0; right: 0; }
@media (max-width: 1199.98px) {
    .nav-actions { align-items: stretch !important; }
    .nav-user-link { max-width: none; border-radius: 10px; }
}
@media (max-width: 991.98px) {
    .filter-actions .btn { flex: 1 1 auto; }
}

/* OPData 1.8 */
.min-w-0 { min-width: 0; }
.entity-overview-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
.entity-overview-card::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    right: -32px;
    bottom: -38px;
    border-radius: 50%;
    background: var(--primary-soft);
}
.entity-leaderboards .content-card { height: 100%; }
.ranked-list { display: grid; gap: .65rem; }
.ranked-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .72rem .8rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}
.ranked-item:hover { border-color: rgba(36,63,52,.34); background: var(--primary-soft); }
.leader-rank {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--primary-dark);
    color: #fff;
    font-weight: 800;
    font-size: .82rem;
}
.ranked-item:nth-child(1) .leader-rank { background: var(--accent); color: #2d2d22; }
.ranked-item:nth-child(2) .leader-rank { background: #66736d; }
.ranked-item:nth-child(3) .leader-rank { background: #8b6c47; }
.mini-bars { display: grid; gap: .72rem; }
.mini-bar-row { display: grid; grid-template-columns: minmax(95px, 150px) 1fr auto; align-items: center; gap: .7rem; }
.mini-bar-label { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-bar-track { height: 9px; border-radius: 999px; background: #edf1ee; overflow: hidden; }
.mini-bar-fill { height: 100%; min-width: 3px; border-radius: inherit; background: var(--primary); }
.mini-bar-value { min-width: 36px; text-align: right; font-size: .82rem; font-weight: 750; }
.timeline-list { position: relative; display: grid; gap: 1rem; }
.timeline-list::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: .75rem; }
.timeline-dot { position: relative; z-index: 1; width: 18px; height: 18px; margin-top: .15rem; border: 4px solid #fff; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px var(--line); }
.data-group { border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.data-group-header { padding: .85rem 1rem; border-bottom: 1px solid var(--line); background: #f8faf8; }
.procurement-item-row + .procurement-item-row { border-top: 1px solid var(--line); }
@media (max-width: 767.98px) {
    .mini-bar-row { grid-template-columns: 92px 1fr; }
    .mini-bar-value { grid-column: 2; }
    .ranked-item { align-items: flex-start; }
    .entity-leaderboards .h5 { font-size: 1rem; }
}
.ranked-list > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .72rem .8rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}
.ranked-list > a:hover { border-color: rgba(36,63,52,.34); background: var(--primary-soft); }
.ranked-list > a span { min-width: 0; }
.ranked-list > a strong,
.ranked-list > a small { display: block; }
.ranked-list > a small { margin-top: .18rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranked-list > a b { flex: 0 0 auto; }
.mini-bars > div { display: grid; grid-template-columns: minmax(72px,105px) 1fr auto; gap: .65rem; align-items: center; }
.mini-bars > div > span { font-size: .8rem; color: var(--muted); }
.mini-bars > div > div { height: 9px; border-radius: 999px; background: #edf1ee; overflow: hidden; }
.mini-bars > div > div > i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: var(--primary); }
.mini-bars > div > strong { min-width: 28px; text-align: right; font-size: .82rem; }


/* OPData 1.9 */
.proc-value-block { flex: 0 0 auto; min-width: 225px; }
.proc-value-amount {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    max-width: 100%;
    white-space: nowrap;
    padding: .48rem .68rem;
    border: 1px solid #d9bd66;
    border-radius: 10px;
    background: #fff8df;
    color: #273a31;
    font-size: clamp(1.02rem, 1.45vw, 1.32rem);
    font-weight: 850;
    letter-spacing: -.025em;
    line-height: 1.1;
    box-shadow: 0 4px 12px rgba(94,70,13,.07);
}
.flag-high_value { background: #e8bd43; color: #2a2414; border-color: #c99b20 !important; }
.flag-high_value i { color: #243f34; }
.procurement-flag.flag-high_value:hover { background: #d9aa29; color: #201d14; }
.urgent-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.footer-bottom-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.footer-version { text-align: center; color: #526159; font-weight: 700; white-space: nowrap; }
.footer-credit-wrap { display: flex; justify-content: flex-end; }
@media (max-width: 1199.98px) { .urgent-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 767.98px) {
    .proc-value-block { min-width: 0; width: 100%; }
    .proc-value-amount { justify-content: flex-start; font-size: 1.12rem; }
    .urgent-grid { grid-template-columns: 1fr; }
    .footer-bottom-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-credit-wrap { justify-content: center; }
}
