/* ==========================================================================
   VitalCare — Hospitals & Clinics Directory
   Design System: "VitalCare" — clean, trustworthy healthcare marketplace
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */
:root {
    --bg: #eef4f3;
    --bg-soft: #f7fbfa;
    --surface: #ffffff;
    --ink: #0f2c2a;
    --text: #223b39;
    --muted: #5f7a77;
    --line: #dce9e7;
    --line-strong: #c3d8d5;

    --primary: #0f766e;
    --primary-strong: #115e59;
    --primary-soft: #e0f2f0;
    --teal: #0d9488;
    --emerald: #059669;
    --emerald-soft: #d1fae5;
    --cyan: #0891b2;
    --cyan-soft: #cffafe;
    --rose: #be185d;
    --rose-soft: #fce7f3;
    --amber: #d97706;
    --amber-soft: #fef3c7;
    --danger: #e11d48;
    --danger-soft: #ffe4e6;
    --ok: #059669;
    --ok-soft: #d1fae5;

    --shadow-sm: 0 1px 2px rgba(15, 44, 42, 0.05);
    --shadow: 0 14px 38px rgba(15, 44, 42, 0.1);
    --shadow-lg: 0 30px 80px rgba(15, 44, 42, 0.22);

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Sora", "Manrope", ui-sans-serif, system-ui, sans-serif;
}

/* Dark theme adjustments (driven by the global #app-window-menu theme switch) */
html[data-bs-theme="dark"] {
    --bg: #0c1716;
    --bg-soft: #12211f;
    --surface: #152624;
    --ink: #e8f7f4;
    --text: #d5e9e6;
    --muted: #8fb0ac;
    --line: #24403c;
    --line-strong: #315750;
    --primary-soft: #12312e;
    --emerald-soft: #0b3a2a;
    --cyan-soft: #0c3a47;
    --rose-soft: #3a1730;
    --amber-soft: #3a2a12;
    --danger-soft: #43101f;
    --ok-soft: #0b3a2a;
    --shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
}

/* --- Reset & base ----------------------------------------------------------- */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(54% 42% at 6% -4%, rgba(13, 148, 136, 0.16), transparent 62%),
        radial-gradient(48% 38% at 96% 2%, rgba(190, 24, 93, 0.1), transparent 60%),
        radial-gradient(40% 34% at 50% 108%, rgba(5, 150, 105, 0.09), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    letter-spacing: -0.015em;
}

button {
    font: inherit;
}

.hidden {
    display: none !important;
}

/* --- Top app bar ------------------------------------------------------------ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid rgba(220, 233, 231, 0.9);
}

html[data-bs-theme="dark"] .topbar {
    background: rgba(12, 23, 22, 0.72);
    border-bottom-color: rgba(36, 64, 60, 0.9);
}

.topbar-inner {
    width: min(1320px, calc(100% - 2rem));
    margin: 0 auto;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--ink);
    font-size: 1.05rem;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--teal) 55%, var(--cyan));
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}

.viewswitch {
    display: flex;
    gap: 0.3rem;
    padding: 0.3rem;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    margin-left: auto;
}

.viewswitch button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 999px;
    padding: 0.5rem 0.95rem;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.viewswitch button:hover {
    color: var(--ink);
}

.viewswitch button.is-active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* --- Shell ------------------------------------------------------------------ */
.shell {
    width: min(1320px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.5rem 0 3.5rem;
}

.panel {
    display: block;
}

.panel.hidden {
    display: none;
}

/* --- Hero ------------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 2.2rem;
    margin-bottom: 1.1rem;
    border: 1px solid var(--line);
    background: linear-gradient(140deg, var(--surface), var(--primary-soft) 130%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}

.hero-copy {
    max-width: 640px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
}

.kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.hero h1 {
    font-size: clamp(1.6rem, 3.2vw, 2.5rem);
    line-height: 1.14;
    color: var(--ink);
    margin: 0.8rem 0 0.9rem;
}

.hero h1 em {
    font-style: normal;
    color: var(--primary);
}

.hero p {
    color: var(--muted);
    line-height: 1.65;
    margin: 0 0 1.3rem;
    max-width: 56ch;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.1rem;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.1rem;
}

.trust-item {
    font-size: 0.85rem;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.trust-check {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--emerald-soft);
    color: var(--emerald);
    font-size: 0.7rem;
    font-weight: 800;
}

.hero-art {
    position: relative;
    flex: 0 0 auto;
    width: 230px;
    height: 230px;
}

.art-card {
    position: absolute;
    inset: 34px 18px 46px;
    border-radius: 24px;
    background: linear-gradient(150deg, var(--surface), var(--primary-soft));
    border: 1px solid var(--line-strong);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-lg);
    transform: rotate(-4deg);
}

.art-pulse {
    position: absolute;
    font-size: 4.2rem;
    color: var(--rose);
    opacity: 0.92;
}

.art-cross {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--primary-soft);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
}

.art-heartbeat {
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 34px;
    border-radius: 8px;
    background: repeating-linear-gradient(90deg,
            transparent 0 14px,
            var(--primary) 14px 15px,
            transparent 15px 30px);
    opacity: 0.35;
}

.art-ground {
    position: absolute;
    bottom: 8px;
    left: 10%;
    right: 10%;
    height: 26px;
    border-radius: 50%;
    background: var(--emerald-soft);
    opacity: 0.7;
    filter: blur(6px);
}

/* --- Panel head -------------------------------------------------------------- */
.panel-head {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.6rem 0 1rem;
}

.panel-head h2 {
    margin: 0 0 0.2rem;
    color: var(--ink);
    font-size: 1.45rem;
}

.panel-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.focus-pick {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.focus-pick label {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
}

.focus-pick select {
    min-width: 220px;
}

/* --- Subscription banner ------------------------------------------------------- */
.sub-banner {
    margin-bottom: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    overflow: hidden;
}

.sub-banner-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.9rem 1.1rem;
}

.sub-banner-copy {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    font-size: 0.92rem;
}

.sub-banner-copy strong {
    color: var(--ink);
}

#subscriptionBadge {
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

#subscriptionBadge.live {
    background: var(--ok-soft);
    color: var(--ok);
}

#subscriptionBadge.pending,
#subscriptionBadge.expired,
#subscriptionBadge.suspended {
    background: var(--amber-soft);
    color: var(--amber);
}

/* --- Buttons ----------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0.55rem 1.05rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    line-height: 1.2;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn-hero {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.3);
}

.btn-hero:hover {
    background: var(--primary-strong);
}

.btn-hero-ghost {
    background: var(--surface);
    color: var(--primary);
    border-color: var(--line-strong);
}

.btn-hero-ghost:hover {
    border-color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-strong);
}

.btn-alt {
    background: var(--surface);
    color: var(--primary);
    border-color: var(--line-strong);
}

.btn-alt:hover {
    border-color: var(--primary);
}

.btn-plain {
    background: var(--bg-soft);
    color: var(--text);
    border-color: var(--line);
}

.btn-plain:hover {
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: transparent;
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
    border-radius: 10px;
}

/* --- Search / filters --------------------------------------------------------- */
.search-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.filters .field {
    flex: 1 1 200px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
}

.filters .field.span-2 {
    flex: 2 1 420px;
}

.filters .field.span-3 {
    flex: 3 1 640px;
}

.filters label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filters label small {
    text-transform: none;
    font-weight: 500;
    color: var(--muted);
}

.check-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    cursor: pointer;
    padding-top: 0.35rem;
}

.check-label input {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input:not([type]),
select,
textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--bg-soft);
    color: var(--text);
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-size: 0.92rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

input.readonly,
input[readonly] {
    background: var(--bg-soft);
    color: var(--muted);
    cursor: not-allowed;
}

textarea {
    resize: vertical;
    min-height: 76px;
}

select {
    cursor: pointer;
}

/* --- Results strip ------------------------------------------------------------ */
.results-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.9rem 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.84rem;
    color: var(--muted);
}

.pill strong {
    color: var(--ink);
}

/* --- Listing grid -------------------------------------------------------------- */
.grid-listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.listing-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.listing-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--line-strong);
}

.listing-top {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: flex-start;
}

.listing-title {
    margin: 0;
    font-size: 1.06rem;
    color: var(--ink);
    line-height: 1.3;
}

.listing-sub {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.2rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 999px;
    padding: 0.22rem 0.6rem;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    text-transform: capitalize;
}

.badge.type {
    background: var(--primary-soft);
    color: var(--primary);
}

.badge.type-hospital {
    background: var(--rose-soft);
    color: var(--rose);
}

.badge.state-active,
.badge.state-confirmed,
.badge.state-completed,
.badge.state-yes {
    background: var(--ok-soft);
    color: var(--ok);
}

.badge.state-pending,
.badge.state-expired,
.badge.state-suspended {
    background: var(--amber-soft);
    color: var(--amber);
}

.badge.state-cancelled,
.badge.state-no {
    background: var(--danger-soft);
    color: var(--danger);
}

.facility-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
}

.facility-stats .stat {
    font-size: 0.83rem;
    color: var(--muted);
}

.facility-stats .stat b {
    color: var(--ink);
}

.member-line {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.55;
}

.listing-actions {
    display: flex;
    gap: 0.55rem;
    margin-top: auto;
    flex-wrap: wrap;
}

/* --- Empty state --------------------------------------------------------------- */
.empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
}

/* --- Console: KPIs ------------------------------------------------------------- */
.manager-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.kpi {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.95rem 1rem;
}

.kpi-label {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.kpi-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
    margin-top: 0.3rem;
}

.kpi-value.accent-primary {
    color: var(--primary);
}

.kpi-value.accent-rose {
    color: var(--rose);
}

.kpi-value.accent-amber {
    color: var(--amber);
}

.kpi-value.accent-emerald {
    color: var(--emerald);
}

/* --- Console workspace ---------------------------------------------------------- */
.workspace {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 1rem;
    align-items: start;
}

.workspace-rail {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    position: sticky;
    top: 84px;
}

.workspace-rail button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 0;
    background: transparent;
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.workspace-rail button:hover {
    background: var(--bg-soft);
    color: var(--ink);
}

.workspace-rail button.is-active {
    background: var(--primary-soft);
    color: var(--primary);
}

.workspace-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tab-content {
    display: none;
}

.tab-content.is-active {
    display: block;
}

.box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    margin-bottom: 1rem;
    min-width: 0;
}

.box h3 {
    margin: 0 0 0.9rem;
    color: var(--ink);
    font-size: 1.05rem;
}

.box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.box-head h3 {
    margin: 0;
}

.split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.split-grid>.box {
    margin-bottom: 0;
}

.filter-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.filter-inline select {
    width: auto;
    min-width: 140px;
}

.service-form-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

/* --- Tables ---------------------------------------------------------------------- */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
    font-size: 0.88rem;
}

th,
td {
    text-align: left;
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

th {
    background: var(--bg-soft);
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover td {
    background: var(--bg-soft);
}

/* --- Tight lists (console rows) ---------------------------------------------------- */
.tight-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.tight-list .row-card {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.8rem 0.95rem;
}

.entry-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.7rem;
}

.entry-top strong {
    color: var(--ink);
    font-size: 0.95rem;
}

.entry-top small {
    color: var(--muted);
    display: block;
    margin-top: 0.15rem;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1rem;
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

.entry-meta b {
    color: var(--ink);
}

.entry-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.7rem;
}

.price-tag {
    color: var(--primary);
    font-weight: 800;
}

.sub-note {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- Facility detail modal ----------------------------------------------------------- */
.clinic-detail {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.cd-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
}

.cd-title {
    margin: 0;
    color: var(--ink);
    font-size: 1.35rem;
}

.cd-location {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.cd-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.cd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cd-meta .stat {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.45rem 0.75rem;
    font-size: 0.83rem;
    color: var(--muted);
}

.cd-meta .stat b {
    color: var(--ink);
}

.cd-section {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.cd-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
    font-size: 1rem;
    margin: 0;
}

.rating-stars {
    color: var(--amber);
    letter-spacing: 0.1em;
}

.specialty-tag {
    display: inline-flex;
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
}

.service-chip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    align-items: center;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.7rem 0.9rem;
    font-size: 0.88rem;
}

.service-chip .sv-name {
    font-weight: 700;
    color: var(--ink);
}

.service-chip .sv-cat {
    font-size: 0.76rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.service-chip .sv-price {
    margin-left: auto;
    font-weight: 800;
    color: var(--primary);
}

.offer-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: linear-gradient(140deg, var(--surface), var(--amber-soft));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.85rem 0.95rem;
}

.offer-item .offer-price {
    font-weight: 800;
    color: var(--amber);
}

.offer-item .offer-price s {
    color: var(--muted);
    font-weight: 500;
}

.doctor-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.55rem 0.8rem;
    font-size: 0.88rem;
}

.doctor-chip .dc-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ok);
}

.doctor-chip .dc-dot.off {
    background: var(--muted);
}

.review-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem 0.9rem;
    background: var(--surface);
}

.review-item .rv-head {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: center;
}

.review-item .rv-name {
    font-weight: 700;
    color: var(--ink);
}

.review-item .rv-date {
    font-size: 0.76rem;
    color: var(--muted);
}

.review-item p {
    margin: 0.45rem 0 0;
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.55;
}

/* --- Modal ----------------------------------------------------------------------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(8, 20, 19, 0.55);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    overflow-y: auto;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    width: min(560px, 100%);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1.3rem;
    box-shadow: var(--shadow-lg);
}

.modal-card-wide {
    width: min(820px, 100%);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.modal-head h3 {
    margin: 0;
    color: var(--ink);
}

.lead-target {
    display: block;
    color: var(--muted);
    margin: -0.3rem 0 1rem;
    font-size: 0.92rem;
}

/* --- Toast ------------------------------------------------------------------------ */
.toast {
    position: fixed;
    bottom: 1.4rem;
    left: 50%;
    transform: translate(-50%, 140%);
    z-index: 300;
    background: var(--ink);
    color: var(--surface);
    border-radius: 14px;
    padding: 0.8rem 1.2rem;
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    max-width: min(90vw, 560px);
    text-align: center;
}

.toast.show {
    transform: translate(-50%, 0);
}

.toast.ok {
    background: var(--emerald);
    color: #fff;
}

.toast.error {
    background: var(--danger);
    color: #fff;
}

/* --- Responsive ---------------------------------------------------------------------- */
@media (max-width: 900px) {
    .hero {
        padding: 1.6rem;
    }

    .hero-art {
        width: 150px;
        height: 150px;
    }

    .art-card {
        inset: 20px 10px 30px;
    }

    .art-pulse {
        font-size: 2.8rem;
    }

    .workspace {
        grid-template-columns: 1fr;
    }

    .workspace-rail {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        overflow-x: auto;
    }

    .split-grid {
        grid-template-columns: 1fr;
    }

    .panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .focus-pick {
        margin-left: 0;
    }
}

@media (max-width: 620px) {
    .hero-art {
        display: none;
    }

    .grid-listings {
        grid-template-columns: 1fr;
    }

    .manager-kpis {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar-inner {
        width: calc(100% - 1.2rem);
    }

    .viewswitch .vs-label {
        display: none;
    }
}

/* ================================================================== */
/* Place banner — the E-Tours (/space) bridge                          */
/*                                                                     */
/* Shown when the directory has been scoped to a place, either by an   */
/* inbound geo deep link or by the visitor's own filters.              */
/* ================================================================== */
.place-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg,
            color-mix(in srgb, var(--primary) 12%, var(--surface)),
            color-mix(in srgb, var(--teal) 10%, var(--surface)));
    border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 1rem;
}

.place-banner[hidden] {
    display: none;
}

.place-banner-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    flex: 1 1 320px;
}

.place-banner-icon {
    font-size: 1.1rem;
    line-height: 1.35;
}

.place-banner-copy {
    min-width: 0;
}

.place-banner-text {
    font-size: 0.92rem;
    line-height: 1.45;
}

.place-banner-stats,
.geo-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.geo-stat {
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 11px;
    font-size: 0.76rem;
    color: var(--muted);
}

.geo-stat strong {
    color: var(--ink);
}

.geo-chips-label {
    display: block;
    width: 100%;
    font-size: 0.76rem;
    color: var(--muted);
}

.chip-btn {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 999px;
    padding: 4px 12px;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.16s, border-color 0.16s;
}

.chip-btn:hover {
    border-color: color-mix(in srgb, var(--primary) 55%, transparent);
    color: var(--primary);
}

.chip-btn .muted {
    color: var(--muted);
    font-weight: 500;
}

.place-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.place-banner-actions [hidden] {
    display: none;
}

/* --- Empty state: widen / clear the place ------------------------ */
.empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 0.9rem;
}

@media (max-width: 620px) {
    .place-banner {
        align-items: flex-start;
    }

    .place-banner-actions {
        width: 100%;
    }

    .place-banner-actions .btn {
        flex: 1 1 46%;
    }
}