:root {
  --ink: #162321;
  --muted: #65716e;
  --line: #dce3df;
  --surface: #ffffff;
  --soft: #f7f8f6;
  --brand: #123c3a;
  --brand-dark: #0b2b2a;
  --brand-soft: #e9f3ef;
  --accent: #b9812a;
  --yellow: #f7d116;
  --blue: #1f4f8f;
  --red: #c5303d;
  --green: #0f7a54;
  --warning: #9a5800;
  --danger: #b42318;
  --shadow: 0 22px 70px rgba(12, 29, 27, .18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--surface); line-height: 1.5; }
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 820px; margin-bottom: 16px; font-size: clamp(2.15rem, 5vw, 4rem); line-height: 1.02; letter-spacing: 0; }
h2 { margin-bottom: 10px; font-size: clamp(1.55rem, 3vw, 2.45rem); letter-spacing: 0; }
h3 { margin-bottom: 7px; }

.shell { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: auto; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 10px 14px; border: 1px solid var(--line); }
.success-notice { position: fixed; left: 50%; top: 86px; z-index: 60; width: min(560px, calc(100% - 32px)); transform: translateX(-50%); padding: 12px 16px; border: 1px solid #b6d9cb; border-left: 4px solid var(--green); border-radius: 8px; background: #f0fbf6; color: #0d513a; box-shadow: var(--shadow); font-weight: 760; }

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.02rem; }
.brand small { color: var(--muted); font-size: .72rem; line-height: 1.3; }
.brand small + small { color: #7b8582; font-size: .66rem; }
.brand-symbol { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--brand); color: #fff; box-shadow: inset 0 -1px 0 rgba(255,255,255,.16); }
.brand-symbol::before { content: "HV"; font-size: .82rem; font-weight: 900; letter-spacing: .02em; }
.brand-symbol i { position: absolute; left: 7px; right: 7px; bottom: 7px; height: 4px; border-radius: 99px; background: linear-gradient(to right, var(--yellow) 0 33.33%, var(--blue) 33.33% 66.66%, var(--red) 66.66% 100%); }
.main-nav { display: flex; align-items: center; gap: 18px; font-size: .93rem; }
.main-nav a:not(.button) { color: var(--muted); text-decoration: none; }
.main-nav a:not(.button):hover { color: var(--brand); }

.button { border: 1px solid transparent; border-radius: 6px; padding: .74rem 1rem; font-weight: 760; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; }
.button-primary { background: var(--brand); color: #fff; }
.button-primary:hover { background: var(--brand-dark); }
.button-secondary { background: #fff; border-color: #bfcac5; color: var(--ink); }
.button-secondary:hover { border-color: var(--brand); color: var(--brand); }
.button-small { min-height: 36px; padding: .52rem .76rem; font-size: .86rem; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 24px; line-height: 1; }

.intro-band { position: relative; overflow: hidden; padding: 66px 0 44px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #ffffff 0%, #f5f7f4 100%); }
.intro-band::before { content: ""; position: absolute; inset: auto 0 0; height: 5px; background: linear-gradient(to right, var(--yellow) 0 33.33%, var(--blue) 33.33% 66.66%, var(--red) 66.66% 100%); }
.intro-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 470px); gap: 36px; align-items: end; }
.intro-copy p:not(.eyebrow) { max-width: 690px; margin-bottom: 0; color: var(--muted); font-size: 1.05rem; }
.intro-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; width: 100%; }
.intro-action { display: grid; gap: 4px; min-height: 112px; padding: 14px; border: 1px solid #c7d4ce; border-radius: 8px; background: #fff; color: var(--ink); text-align: left; text-decoration: none; box-shadow: 0 10px 28px rgba(18,60,58,.08); }
.intro-action:hover { border-color: var(--brand); transform: translateY(-1px); }
.intro-action:focus-visible { outline: 3px solid rgba(18,60,58,.2); outline-offset: 2px; }
.intro-action span { font-size: 1.35rem; line-height: 1; }
.intro-action strong { font-size: .94rem; line-height: 1.15; }
.intro-action small { color: var(--muted); font-size: .79rem; line-height: 1.3; }
.intro-action.is-request { border-left: 4px solid var(--red); }
.intro-action.is-offer { border-left: 4px solid var(--green); }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .78rem; font-weight: 820; text-transform: uppercase; letter-spacing: .08em; }

.directory-section { padding: 54px 0 72px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.section-heading p:last-child { color: var(--muted); margin-bottom: 5px; }
.view-toggle, .scope-toggle { display: inline-flex; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #f9faf8; }
.view-toggle { flex-wrap: wrap; }
.scope-toggle { margin-left: 8px; }
.view-button, .scope-button { min-width: 126px; border: 0; border-radius: 5px; padding: .62rem .9rem; background: transparent; color: var(--muted); font-weight: 800; }
.view-button.is-active, .scope-button.is-active { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(18,60,58,.16); }
.filters { display: grid; grid-template-columns: minmax(220px, 1.55fr) repeat(3, minmax(130px, 1fr)) auto auto auto; gap: 10px; align-items: end; padding: 14px 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.field { display: grid; gap: 6px; min-width: 0; }
.field span, .check-field { color: #3e4c47; font-size: .82rem; font-weight: 730; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #becbc6; border-radius: 6px; background: #fff; padding: .68rem .72rem; color: var(--ink); outline: none; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(18,60,58,.13); }
.check-field { display: flex; align-items: center; gap: 8px; min-height: 41px; white-space: nowrap; }
.check-field input { width: 17px; height: 17px; accent-color: var(--brand); }
.full-width { align-items: flex-start; white-space: normal; line-height: 1.35; }
.data-notice { margin: 18px 0 0; padding: 10px 0; border-top: 1px solid #fedf89; border-bottom: 1px solid #fedf89; color: #7a4c00; font-size: .9rem; }

.table-wrap { max-width: 100%; margin-top: 22px; overflow-x: auto; overflow-y: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.centers-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.centers-table th, .centers-table td { padding: 15px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid #e8eeeb; }
.centers-table th { color: #44534e; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; background: #fbfcfb; }
.centers-table tr:last-child td { border-bottom: 0; }
.center-name { display: block; margin-bottom: 5px; font-weight: 830; }
.center-type, .location, .updated { color: var(--muted); font-size: .9rem; }
.status-badge, .verification-badge, .need-tag { display: inline-flex; align-items: center; width: max-content; border-radius: 999px; padding: 4px 8px; font-size: .73rem; font-weight: 810; }
.status-badge { background: #e6f5ef; color: #086653; }
.status-badge.urgent { background: #fff0ed; color: var(--danger); }
.status-badge.limited { background: #fff7e6; color: var(--warning); }
.status-badge.closed { background: #f0f2f2; color: #59615f; }
.verification-badge { background: var(--brand-soft); color: var(--brand); }
.verification-badge.pending { background: #f7f1df; color: #875d09; }
.need-row { display: flex; flex-wrap: wrap; gap: 7px; }
.need-tag { background: #eff5f2; color: #33534a; }
.row-actions { text-align: right; }
.link-button { border: 0; background: transparent; padding: 0; color: var(--brand); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.empty-state { text-align: center; padding: 48px 20px; border-bottom: 1px solid var(--line); }
.empty-state p { color: var(--muted); }

.professional-section { padding: 68px 0; background: #f7faf8; border-bottom: 1px solid var(--line); }
.professional-layout { display: grid; grid-template-columns: .42fr .58fr; gap: 38px; align-items: start; }
.professional-section p:not(.eyebrow) { max-width: 520px; color: var(--muted); }
.professional-panel { border-top: 1px solid var(--line); padding-top: 16px; }
.professional-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.professional-tags span { display: inline-flex; align-items: center; min-height: 34px; padding: .45rem .7rem; border: 1px solid #c7d4ce; border-radius: 6px; background: #fff; color: #365149; font-size: .84rem; font-weight: 760; }
.professional-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.professional-action { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; min-height: 118px; padding: 16px; border: 1px solid #c7d4ce; border-radius: 8px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 10px 28px rgba(18,60,58,.08); }
.professional-action:hover { border-color: var(--brand); transform: translateY(-1px); }
.professional-action:focus-visible { outline: 3px solid rgba(18,60,58,.2); outline-offset: 2px; }
.professional-action.is-request { border-left: 4px solid var(--red); }
.professional-action.is-offer { border-left: 4px solid var(--green); }
.professional-action-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 8px; background: var(--brand-soft); font-size: 1.45rem; }
.professional-action strong { display: block; margin-bottom: 4px; font-size: 1rem; }
.professional-action small { display: block; color: var(--muted); font-size: .86rem; line-height: 1.35; }
.professional-posts { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.professional-posts-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.professional-posts-heading strong { color: var(--ink); font-size: .98rem; }
.professional-list { display: grid; gap: 10px; }
.professional-card { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.professional-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.professional-card h3 { margin: 0 0 3px; font-size: 1rem; }
.professional-card p { margin-bottom: 8px; color: var(--muted); font-size: .9rem; }
.professional-card .location { display: block; margin-top: 2px; }
.professional-card-actions { display: flex; justify-content: flex-end; }
.empty-professional { margin: 0; color: var(--muted); font-size: .9rem; }
.history-section { padding: 42px 0; background: #fff; border-bottom: 1px solid var(--line); }
.history-list { display: grid; gap: 10px; }
.history-list-full { margin-top: 18px; max-height: min(62vh, 560px); overflow: auto; padding-right: 4px; }
.history-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.history-item strong { display: block; margin-bottom: 3px; }
.history-item span { display: block; color: var(--muted); font-size: .88rem; }
.report-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 18px; }

.admin-section { padding: 58px 0 72px; background: #f7faf8; border-top: 1px solid var(--line); }
.admin-login { max-width: 620px; padding-top: 6px; }
.admin-login-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.admin-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-sidebar { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; position: sticky; top: 92px; }
.admin-nav-button { min-height: 42px; border: 0; border-radius: 6px; padding: .72rem .78rem; background: transparent; color: var(--muted); text-align: left; font-weight: 800; }
.admin-nav-button:hover, .admin-nav-button.is-active { background: var(--brand-soft); color: var(--brand-dark); }
.admin-logout { margin-top: 8px; color: var(--danger); border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; }
.admin-content { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 18px; }
.admin-view { display: none; }
.admin-view.is-active { display: block; }
.admin-view h3 { margin-bottom: 14px; font-size: 1.22rem; }
.admin-view-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.admin-view-heading h3 { margin-bottom: 0; }
.admin-view-heading span, .admin-note { color: var(--muted); font-size: .9rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.kpi-card { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfb; }
.kpi-card strong { display: block; margin-bottom: 4px; font-size: 1.6rem; line-height: 1; color: var(--brand); }
.kpi-card span { color: var(--muted); font-size: .84rem; font-weight: 760; }
.admin-chart { display: grid; gap: 10px; margin-top: 8px; }
.chart-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 42px; gap: 10px; align-items: center; }
.chart-row span { color: var(--muted); font-size: .86rem; font-weight: 760; }
.chart-track { height: 14px; border-radius: 999px; background: #e8eeeb; overflow: hidden; }
.chart-bar { height: 100%; border-radius: inherit; background: linear-gradient(to right, var(--brand), var(--green)); }
.admin-list { display: grid; gap: 10px; margin-top: 14px; }
.admin-list-item { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfb; }
.admin-list-item strong { display: block; }
.admin-list-item span, .admin-list-item p { margin: 0; color: var(--muted); font-size: .88rem; }
.backup-list .admin-list-item { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }

.register-band { padding: 42px 0; background: #f9faf7; border-top: 1px solid var(--line); }
.register-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.register-band p:not(.eyebrow) { margin-bottom: 0; color: var(--muted); }
.support-copy { margin-top: 8px; font-size: .9rem; }

.app-dialog { width: min(760px, calc(100% - 32px)); border: 0; padding: 0; border-radius: 8px; box-shadow: var(--shadow); }
.registration-dialog { width: min(860px, calc(100% - 32px)); }
.app-dialog::backdrop { background: rgba(5, 16, 24, .62); }
.dialog-shell { position: relative; padding: 26px; background: #fff; }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin-bottom: 0; font-size: clamp(1.35rem, 3vw, 2rem); }
.dialog-close { position: absolute; right: 14px; top: 14px; }
.register-form { padding-top: 18px; }
.form-section-title { margin: 8px 0 12px; color: var(--accent); font-size: .82rem; font-weight: 830; text-transform: uppercase; letter-spacing: .07em; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.register-form > .field, .register-form > .check-field { margin-bottom: 12px; }
.contacts-list { border-top: 1px solid var(--line); }
.contact-row { position: relative; display: grid; grid-template-columns: minmax(180px, .85fr) minmax(280px, 1.15fr) auto; gap: 12px; align-items: end; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-row-title { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.phone-field { display: grid; gap: 6px; min-width: 0; }
.phone-field > span { color: #3e4c47; font-size: .82rem; font-weight: 730; }
.phone-control { display: grid; grid-template-columns: minmax(118px, .55fr) minmax(150px, 1fr); gap: 8px; }
.phone-control select, .phone-control input { min-width: 0; width: 100%; border: 1px solid #becbc6; border-radius: 6px; background: #fff; padding: .68rem .72rem; color: var(--ink); outline: none; }
.phone-control select:focus, .phone-control input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(18,60,58,.13); }
.remove-contact { align-self: end; margin-bottom: 2px; border-radius: 6px; font-size: 20px; }
.contact-actions { display: flex; justify-content: flex-start; margin: 10px 0 20px; }
.needs-fieldset { min-width: 0; margin: 0 0 12px; padding: 0; border: 0; }
.needs-fieldset legend { margin-bottom: 8px; color: #3e4c47; font-size: .82rem; font-weight: 730; }
.need-options { display: flex; flex-wrap: wrap; gap: 8px; }
.need-option { position: relative; cursor: pointer; }
.need-option input { position: absolute; opacity: 0; pointer-events: none; }
.need-option span { display: inline-flex; align-items: center; min-height: 36px; padding: .48rem .75rem; border: 1px solid #becbc6; border-radius: 6px; background: #fff; color: #3e4c47; font-size: .84rem; font-weight: 760; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.need-option input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.need-option input:focus-visible + span { outline: 3px solid rgba(18,60,58,.2); outline-offset: 2px; }
.field-error { min-height: 1.2em; margin: 6px 0 0; color: var(--danger); font-size: .8rem; }
.urgent-check { width: max-content; max-width: 100%; padding: 8px 11px; border-left: 3px solid var(--red); background: #fff7f5; color: #7c271f; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.form-feedback { min-height: 1.3em; margin: 11px 0 0; font-size: .9rem; color: var(--brand); }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 16px 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.detail-meta div { padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-meta strong, .detail-meta span { display: block; }
.detail-meta span { color: var(--muted); margin-top: 3px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.site-footer { background: #0b1714; color: #dceae5; }
.footer-inner { min-height: 74px; }
.footer-inner p { margin: 0; font-size: .9rem; }
.footer-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.footer-link { border: 0; padding: 0; color: #b8d8ce; background: transparent; text-decoration: underline; font-size: .9rem; }

@media (max-width: 1040px) {
  .intro-layout, .professional-layout { grid-template-columns: 1fr; }
  .filters { grid-template-columns: repeat(3, 1fr); }
  .field-search { grid-column: span 3; }
}

@media (max-width: 720px) {
  .header-inner { min-height: 64px; }
  .main-nav a:not(.button) { display: none; }
  .brand small { display: none; }
  .intro-band { padding: 46px 0 34px; }
  .register-band-inner, .section-heading { align-items: flex-start; flex-direction: column; }
  .filters { grid-template-columns: 1fr 1fr; }
  .field-search, .filters .button { grid-column: span 2; }
  .two-columns, .detail-meta { grid-template-columns: 1fr; }
  .professional-actions { grid-template-columns: 1fr; }
  .report-options { grid-template-columns: 1fr; }
  .admin-login-form, .admin-shell, .kpi-grid, .chart-row { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .backup-list .admin-list-item { grid-template-columns: 1fr; }
  .history-item { grid-template-columns: 1fr; }
  .contact-row { grid-template-columns: 1fr auto; }
  .contact-row > .field, .contact-row > .phone-field { grid-column: 1 / -1; }
  .contact-row-title { grid-column: 1; }
  .remove-contact { grid-column: 2; grid-row: 1; }
  .view-toggle, .scope-toggle { display: flex; width: 100%; margin-left: 0; }
  .view-button, .scope-button { flex: 1; min-width: 0; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .footer-inner { padding: 18px 0; align-items: flex-start; flex-direction: column; gap: 6px; }
}

@media (max-width: 440px) {
  .filters { grid-template-columns: 1fr; }
  .field-search, .filters .button { grid-column: span 1; }
  .intro-actions { grid-template-columns: 1fr; }
  .check-field { white-space: normal; }
  .phone-control { grid-template-columns: 112px minmax(0, 1fr); }
}
