/* ==========================================================================
   nobatdr24 — provider profile (single nobat_provider)
   --------------------------------------------------------------------------
   Reproduces the _3 mockup: identity hero, booking core with Jalali date
   strip + shift-grouped slots, clinic rail, service grid, review block.

   Namespace: .nd-p-*   (nd-panel / nd-kv already exist in plugin.css and are
   deliberately NOT reused here.)

   Mobile-first correctness rules used throughout:
   • every grid column is minmax(0, 1fr) so long Persian strings can shrink
   • every flex child that holds text gets min-width: 0
   • horizontal scrollers use overflow-x: auto + scroll-snap, never page-wide
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Shell
   -------------------------------------------------------------------------- */
.nd-p {
    background:
        radial-gradient(1200px 420px at 100% -140px, rgba(0, 97, 148, .07), transparent 70%),
        radial-gradient(900px 380px at 0% 120px, rgba(5, 150, 105, .05), transparent 70%),
        var(--nd-bg);
    padding-bottom: 3.5rem;
}

.nd-p-body {
    display: grid;
    gap: 1.5rem;
    padding-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   2. Trust bar
   -------------------------------------------------------------------------- */
.nd-p-topbar {
    background: #f2f5fa;
    border-bottom: 1px solid var(--nd-border);
}

.nd-p-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-block: .85rem;
}

.nd-p-topbar__crumb {
    margin-bottom: 0;
    min-width: 0;
}

.nd-p-topbar__crumb a {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.nd-p-topbar__crumb .is-current {
    color: var(--nd-text);
    font-weight: 700;
}

.nd-p-topbar__badges {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    min-width: 0;
}

.nd-p-trust {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .7rem;
    border-radius: var(--nd-radius-full);
    background: var(--nd-secondary-tint);
    color: var(--nd-secondary);
    border: 1px solid #d1fae5;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.9;
}

.nd-p-trust svg { width: 15px; height: 15px; flex: none; }

.nd-p-updated {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    color: var(--nd-text-3);
}

.nd-p-updated svg { width: 15px; height: 15px; color: var(--nd-secondary-strong); flex: none; }

/* --------------------------------------------------------------------------
   3. Flash messages
   -------------------------------------------------------------------------- */
.nd-p-flash {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem 1.15rem;
    border-radius: var(--nd-radius-md);
    border: 1px solid;
    font-size: .875rem;
    line-height: 1.9;
}

.nd-p-flash strong { display: block; font-size: .9375rem; margin-bottom: .15rem; }
.nd-p-flash p { margin: 0; }
.nd-p-flash__icon { flex: none; display: grid; place-items: center; width: 24px; height: 24px; }
.nd-p-flash__icon svg { width: 22px; height: 22px; }

.nd-p-flash--ok {
    background: var(--nd-secondary-tint);
    border-color: #a7f3d0;
    color: #065f46;
}
.nd-p-flash--ok strong { color: #047857; }

.nd-p-flash--err {
    background: var(--nd-rose-tint);
    border-color: #fecdd3;
    color: #9f1239;
}
.nd-p-flash--err strong { color: #be123c; }

.nd-p-code-inline {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    background: #fff;
    padding: .05rem .4rem;
    border-radius: .3rem;
    border: 1px solid #a7f3d0;
    letter-spacing: .06em;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   4. Identity hero
   -------------------------------------------------------------------------- */
.nd-p-hero {
    position: relative;
    overflow: hidden;
    background: var(--nd-surface);
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius-xl);
    box-shadow: var(--nd-shadow-raised);
    padding: 1.5rem;
}

.nd-p-hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.nd-p-hero__glow--a {
    width: 280px; height: 280px;
    top: -140px; left: -100px;
    background: rgba(147, 204, 255, .28);
}

.nd-p-hero__glow--b {
    width: 220px; height: 220px;
    bottom: -130px; right: 22%;
    background: rgba(104, 219, 169, .22);
}

.nd-p-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.75rem;
    align-items: flex-start;
}

.nd-p-hero__main {
    display: flex;
    gap: 1.35rem;
    align-items: flex-start;
    min-width: 0;
}

/* Photo */
.nd-p-hero__photo {
    position: relative;
    flex: none;
    width: 132px;
}

.nd-p-hero__frame {
    width: 132px;
    height: 132px;
    border-radius: 1rem;
    padding: 4px;
    background: var(--nd-surface-3);
    box-shadow: var(--nd-shadow-floating);
    overflow: hidden;
}

.nd-p-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: .75rem;
    background: var(--nd-surface-2);
}

.nd-p-hero__img--initial {
    display: grid;
    place-items: center;
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--nd-primary);
    background: linear-gradient(160deg, #e0f2fe, #cce5ff);
}

.nd-p-hero__stamp {
    position: absolute;
    bottom: -9px;
    inset-inline-start: -8px;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .55rem;
    border-radius: var(--nd-radius-full);
    background: var(--nd-secondary-strong);
    color: #fff;
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1.9;
    box-shadow: var(--nd-shadow-raised);
    white-space: nowrap;
}

.nd-p-hero__stamp svg { width: 12px; height: 12px; flex: none; }

/* Text block */
.nd-p-hero__text {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    min-width: 0;
    padding-top: .1rem;
}

.nd-p-hero__titlerow {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-wrap: wrap;
}

.nd-p-hero__titlerow h1 {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    line-height: 1.4;
}

.nd-p-code {
    display: inline-flex;
    align-items: center;
    padding: .15rem .65rem;
    border-radius: var(--nd-radius-full);
    background: var(--nd-primary-soft);
    color: var(--nd-primary-hover);
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.9;
    white-space: nowrap;
}

.nd-p-hero__spec {
    margin: 0;
    font-size: .9375rem;
    font-weight: 700;
    color: var(--nd-primary);
    line-height: 1.8;
}

.nd-p-hero__facts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem 1rem;
    font-size: .8125rem;
    color: var(--nd-text-3);
}

.nd-p-hero__facts li {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    min-width: 0;
}

.nd-p-hero__facts li + li::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--nd-border-strong);
    margin-inline-end: .35rem;
    order: -1;
}

.nd-p-hero__facts li.is-live { color: var(--nd-secondary); font-weight: 700; }

.nd-p-hero__facts svg {
    width: 17px; height: 17px;
    flex: none;
    color: var(--nd-primary);
}
.nd-p-hero__facts li.is-live svg { color: var(--nd-secondary-strong); }

.nd-p-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    padding-top: .15rem;
}

.nd-p-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .7rem;
    border-radius: .55rem;
    background: var(--nd-surface-2);
    color: var(--nd-text-2);
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.9;
}

.nd-p-chip svg { width: 16px; height: 16px; color: var(--nd-primary); flex: none; }

.nd-p-chip--gold {
    background: var(--nd-amber-tint);
    color: #92400e;
    border: 1px solid #fde68a;
}
.nd-p-chip--gold svg { color: #b45309; }

/* Rating summary */
.nd-p-scorecard {
    flex: none;
    width: 232px;
    display: flex;
    flex-direction: column;
    gap: .85rem;
    padding: 1.1rem;
    border-radius: var(--nd-radius-md);
    background: #f4f7fb;
    border: 1px solid #e6edf5;
}

.nd-p-scorecard__top {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.nd-p-scorecard__star {
    display: grid;
    place-items: center;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: #fff;
    color: var(--nd-amber);
    box-shadow: var(--nd-shadow-flat);
    flex: none;
}
.nd-p-scorecard__star svg { width: 26px; height: 26px; fill: currentColor; }

.nd-p-scorecard__value { min-width: 0; }

.nd-p-scorecard__num {
    display: flex;
    align-items: baseline;
    gap: .25rem;
}

.nd-p-scorecard__num strong {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--nd-text);
}

.nd-p-scorecard__num span { font-size: .75rem; color: var(--nd-text-3); }

.nd-p-scorecard__satisfaction {
    display: block;
    font-size: .6875rem;
    font-weight: 700;
    color: var(--nd-secondary);
}

.nd-p-scorecard__bar {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-width: 0;
}

.nd-p-scorecard__stars .nd-star svg { width: 15px; height: 15px; }

.nd-p-scorecard__meta {
    margin: 0;
    font-size: .6875rem;
    color: var(--nd-text-3);
    line-height: 1.8;
}

.nd-p-scorecard__cta {
    width: 100%;
    padding: .6rem 1rem;
    font-size: .8125rem;
}

.nd-p-scorecard__next {
    display: flex;
    align-items: flex-start;
    gap: .35rem;
    margin: 0;
    padding-top: .6rem;
    border-top: 1px dashed #d8e3ee;
    font-size: .6875rem;
    line-height: 1.9;
    color: var(--nd-text-3);
}

.nd-p-scorecard__next svg { width: 14px; height: 14px; flex: none; margin-top: .35rem; color: var(--nd-secondary-strong); }

.nd-p-scorecard__next span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nd-p-scorecard__next em {
    font-style: normal;
    color: var(--nd-text-3);
}

.nd-p-scorecard__next b {
    color: var(--nd-text);
    font-weight: 800;
}

/* Progress bar primitive */
.nd-p-bar {
    height: 8px;
    border-radius: var(--nd-radius-full);
    background: #dde5ef;
    overflow: hidden;
}

.nd-p-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--nd-secondary-strong), #34d399);
}

.nd-p-bar--thin { height: 6px; }

/* --------------------------------------------------------------------------
   5. Two-column body
   -------------------------------------------------------------------------- */
.nd-p-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 348px;
    gap: 1.5rem;
    align-items: start;
}

.nd-p-main,
.nd-p-aside {
    display: grid;
    gap: 1.25rem;
    min-width: 0;
}

.nd-p-aside {
    position: sticky;
    top: calc(var(--nd-header-h) + 16px);
}

/* Card primitive */
.nd-p-card {
    background: var(--nd-surface);
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius-xl);
    box-shadow: var(--nd-shadow-flat);
    padding: 1.4rem;
    min-width: 0;
}

.nd-p-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}

.nd-p-card__heading {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.6;
}

.nd-p-card__heading svg { width: 20px; height: 20px; color: var(--nd-primary); flex: none; }

/* --------------------------------------------------------------------------
   6. Booking card
   -------------------------------------------------------------------------- */
.nd-p-book { scroll-margin-top: calc(var(--nd-header-h) + 20px); }

.nd-p-book__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--nd-border);
    margin-bottom: 1.15rem;
}

.nd-p-card__title {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    min-width: 0;
}

.nd-p-card__icon {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: .7rem;
    background: var(--nd-primary);
    color: #fff;
    flex: none;
}

.nd-p-card__icon svg { width: 20px; height: 20px; }

.nd-p-card__title h2 {
    margin: 0 0 .1rem;
    font-size: 1.0625rem;
    line-height: 1.6;
}

.nd-p-card__title p {
    margin: 0;
    font-size: .8125rem;
    color: var(--nd-text-3);
    line-height: 1.8;
}

/* Service tabs */
.nd-p-tabs {
    display: flex;
    gap: .25rem;
    padding: .25rem;
    border-radius: .7rem;
    background: var(--nd-surface-2);
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}
.nd-p-tabs::-webkit-scrollbar { display: none; }

.nd-p-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    padding: .45rem .8rem;
    border: 0;
    border-radius: .55rem;
    background: transparent;
    color: var(--nd-text-3);
    font-family: inherit;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.8;
    cursor: pointer;
    white-space: nowrap;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.nd-p-tab svg { width: 16px; height: 16px; flex: none; }

.nd-p-tab:hover { color: var(--nd-text); }

.nd-p-tab.is-active {
    background: #fff;
    color: var(--nd-primary);
    box-shadow: var(--nd-shadow-flat);
}

/* Date strip */
.nd-p-dates__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .7rem;
}

.nd-p-dates__label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--nd-text);
    min-width: 0;
}

.nd-p-dates__label svg { width: 17px; height: 17px; color: var(--nd-primary); flex: none; }

.nd-p-dates__label em {
    font-style: normal;
    font-weight: 400;
    color: var(--nd-text-3);
}

.nd-p-dates__nav { display: inline-flex; gap: .3rem; }

.nd-p-iconbtn {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: .5rem;
    border: 1px solid var(--nd-border);
    background: var(--nd-surface-2);
    color: var(--nd-text-2);
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
    padding: 0;
}

.nd-p-iconbtn:hover { background: #e6edf5; border-color: var(--nd-border-strong); }
.nd-p-iconbtn svg { width: 17px; height: 17px; }

.nd-p-dates__strip {
    display: flex;
    gap: .55rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: .45rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.nd-p-dates__strip::-webkit-scrollbar { display: none; }

.nd-p-day {
    /* Seven cards per view on desktop: no half-clipped card at the edge,
       and the arrows page by exactly one view. */
    flex: 0 0 calc((100% - 6 * .55rem) / 7);
    min-width: 0;
    min-height: 116px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: .3rem;
    padding: .7rem .55rem;
    border-radius: .85rem;
    border: 1px solid var(--nd-border);
    background: var(--nd-surface-2);
    color: var(--nd-text);
    font-family: inherit;
    text-align: right;
    cursor: pointer;
    scroll-snap-align: start;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}

.nd-p-day:hover:not(:disabled) {
    background: #e9eef6;
    border-color: var(--nd-border-strong);
}

.nd-p-day.is-active {
    background: var(--nd-primary);
    border-color: var(--nd-primary);
    color: #fff;
    box-shadow: var(--nd-shadow-raised);
}

.nd-p-day.is-full,
.nd-p-day:disabled {
    opacity: .55;
    cursor: not-allowed;
    background: var(--nd-surface-2);
}

.nd-p-day__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .25rem;
    font-size: .6875rem;
    font-weight: 700;
    color: var(--nd-text-3);
}

.nd-p-day.is-active .nd-p-day__top { color: rgba(255, 255, 255, .9); }

.nd-p-day__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--nd-secondary-soft);
    flex: none;
}

.nd-p-day__lock { display: inline-flex; color: var(--nd-rose); }
.nd-p-day__lock svg { width: 13px; height: 13px; }

.nd-p-day__mid {
    display: flex;
    align-items: baseline;
    gap: .25rem;
}

.nd-p-day__num {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
}

.nd-p-day__mon {
    font-size: .6875rem;
    color: var(--nd-text-3);
}
.nd-p-day.is-active .nd-p-day__mon { color: rgba(255, 255, 255, .9); }

.nd-p-day__free {
    display: block;
    font-size: .625rem;
    font-weight: 700;
    text-align: center;
    padding: .1rem .3rem;
    border-radius: .3rem;
    background: #e3ecf6;
    color: var(--nd-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nd-p-day.is-active .nd-p-day__free {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.nd-p-day.is-full .nd-p-day__free {
    background: var(--nd-rose-tint);
    color: #b91c1c;
}

/* Shifts */
.nd-p-shifts {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 1.15rem;
    padding-top: 1.15rem;
    border-top: 1px dashed var(--nd-border);
}

.nd-p-shifts__legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: .6875rem;
    color: var(--nd-text-3);
    flex-wrap: wrap;
}

.nd-p-shifts__legend span {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.nd-p-legend {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex: none;
}
.nd-p-legend--free { background: var(--nd-secondary-soft); }
.nd-p-legend--full { background: #d5dde7; }

.nd-p-shift__head {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
    margin-bottom: .6rem;
}

.nd-p-shift__dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    flex: none;
}
.nd-p-shift__dot--morning { background: var(--nd-amber); }
.nd-p-shift__dot--afternoon { background: var(--nd-sky); }
.nd-p-shift__dot--evening { background: #6366f1; }

.nd-p-shift__head h3 {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.6;
}

.nd-p-shift__range {
    font-size: .75rem;
    color: var(--nd-text-3);
}

.nd-p-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
    gap: .5rem;
}

.nd-p-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    padding: .55rem .4rem;
    border-radius: .65rem;
    border: 1px solid var(--nd-border);
    background: var(--nd-surface-2);
    color: var(--nd-text);
    font-family: inherit;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.nd-p-slot:hover:not(:disabled) {
    background: var(--nd-primary-tint);
    border-color: var(--nd-primary-soft);
}

.nd-p-slot__time {
    font-size: .9375rem;
    font-weight: 800;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

.nd-p-slot__state {
    font-size: .625rem;
    font-weight: 700;
    color: var(--nd-secondary);
    line-height: 1.6;
}

.nd-p-slot.is-selected {
    background: var(--nd-primary);
    border-color: var(--nd-primary);
    color: #fff;
    box-shadow: var(--nd-shadow-raised);
}
.nd-p-slot.is-selected .nd-p-slot__state { color: rgba(255, 255, 255, .85); }

.nd-p-slot.is-full,
.nd-p-slot:disabled {
    background: #f1f4f8;
    border-color: #e6ebf2;
    color: #a3aebc;
    cursor: not-allowed;
}
.nd-p-slot.is-full .nd-p-slot__time { text-decoration: line-through; }
.nd-p-slot.is-full .nd-p-slot__state { color: #b6bfca; }

/* Patient fields */
.nd-p-patient {
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: var(--nd-radius-md);
    border: 1px solid var(--nd-border);
    background: #fafcfe;
}

.nd-p-patient__title {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: 0 0 .8rem;
    font-size: .875rem;
    line-height: 1.7;
}

.nd-p-patient__title svg { width: 17px; height: 17px; color: var(--nd-primary); flex: none; }

.nd-p-patient__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

.nd-p-field {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
    font-size: .75rem;
    font-weight: 700;
    color: var(--nd-text-2);
}

.nd-p-field > span { display: inline-flex; align-items: center; gap: .2rem; }
.nd-p-field em { color: var(--nd-rose); font-style: normal; }

.nd-p-field input,
.nd-p-field select,
.nd-p-field textarea {
    width: 100%;
    min-width: 0;
    padding: .5rem .65rem;
    border: 1px solid var(--nd-border-strong);
    border-radius: .55rem;
    background: #fff;
    font-family: inherit;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--nd-text);
    line-height: 1.8;
    transition: border-color .16s ease, box-shadow .16s ease;
    -webkit-appearance: none;
    appearance: none;
}

.nd-p-field textarea { resize: vertical; min-height: 80px; }

.nd-p-field input:focus,
.nd-p-field select:focus,
.nd-p-field textarea:focus {
    outline: none;
    border-color: var(--nd-sky);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, .13);
}

.nd-p-field input::placeholder,
.nd-p-field textarea::placeholder { color: #9aa6b5; font-weight: 400; }

.nd-p-field.is-invalid input { border-color: var(--nd-rose); box-shadow: 0 0 0 3px rgba(225, 29, 72, .1); }

/* Summary + submit */
.nd-p-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: var(--nd-radius-md);
    background: #f2f6fa;
    border: 1px solid #e6edf5;
}

.nd-p-summary__info {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    min-width: 0;
    flex: 1 1 260px;
}

.nd-p-summary__icon {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: .65rem;
    background: var(--nd-secondary-soft);
    color: #065f46;
    flex: none;
}
.nd-p-summary__icon svg { width: 22px; height: 22px; }

.nd-p-summary__text {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}

.nd-p-summary__label { font-size: .6875rem; color: var(--nd-text-3); }

.nd-p-summary__value {
    font-size: .9375rem;
    font-weight: 800;
    line-height: 1.7;
    color: var(--nd-text);
    overflow-wrap: anywhere;
}

.nd-p-summary__hint {
    font-size: .75rem;
    color: var(--nd-secondary);
    font-weight: 700;
    line-height: 1.8;
}

.nd-p-submit {
    flex: 0 0 auto;
    padding: .8rem 1.5rem;
    font-size: .9375rem;
}

.nd-p-submit:disabled,
.nd-p-submit[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}

/* Empty state */
.nd-p-empty {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1rem;
    border-radius: var(--nd-radius-md);
    background: var(--nd-amber-tint);
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: .8125rem;
    line-height: 1.9;
}
.nd-p-empty svg { width: 20px; height: 20px; flex: none; color: #b45309; }
.nd-p-empty p { margin: 0; }
.nd-p-empty--sm { background: var(--nd-surface-2); border-color: var(--nd-border); color: var(--nd-text-3); }
.nd-p-empty--sm svg { color: var(--nd-text-3); }

/* --------------------------------------------------------------------------
   7. Services grid
   -------------------------------------------------------------------------- */
.nd-p-services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: .8rem;
}

.nd-p-service {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .9rem;
    border-radius: var(--nd-radius-md);
    background: #f6f9fc;
    border: 1px solid #e9eff6;
    min-width: 0;
    transition: border-color .16s ease, background .16s ease;
}

.nd-p-service:hover { background: #f0f6fc; border-color: #d8e5f1; }

.nd-p-service__icon {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: .5rem;
    background: var(--nd-primary-soft);
    color: var(--nd-primary);
    flex: none;
}
.nd-p-service__icon svg { width: 19px; height: 19px; }

.nd-p-service__body { min-width: 0; }

.nd-p-service__body h3 {
    margin: 0 0 .15rem;
    font-size: .875rem;
    line-height: 1.7;
}

.nd-p-service__body p {
    margin: 0 0 .4rem;
    font-size: .75rem;
    color: var(--nd-text-3);
    line-height: 1.9;
}

.nd-p-service__meta {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    font-size: .75rem;
}

.nd-p-service__price { font-weight: 800; color: var(--nd-primary); }
.nd-p-service__price.is-free { color: var(--nd-secondary); }

.nd-p-service__time {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    color: var(--nd-text-3);
    font-size: .6875rem;
}
.nd-p-service__time svg { width: 13px; height: 13px; }

/* About */
.nd-p-about p {
    margin: 0 0 .75rem;
    font-size: .875rem;
    line-height: 2.1;
    color: var(--nd-text-2);
}
.nd-p-about p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   8. Clinic rail
   -------------------------------------------------------------------------- */
.nd-p-clinic__row {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-bottom: 1rem;
}

.nd-p-clinic__icon {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: .5rem;
    background: #f1f5f9;
    color: var(--nd-primary);
    flex: none;
}
.nd-p-clinic__icon--sm { width: 30px; height: 30px; }
.nd-p-clinic__icon svg { width: 18px; height: 18px; }

.nd-p-clinic__label {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .6875rem;
    font-weight: 700;
    color: var(--nd-text-3);
    margin-bottom: .15rem;
}
.nd-p-clinic__label svg { width: 15px; height: 15px; flex: none; color: var(--nd-primary); }

.nd-p-clinic__row p {
    margin: 0;
    font-size: .8125rem;
    line-height: 2;
    color: var(--nd-text-2);
    overflow-wrap: anywhere;
}

.nd-p-clinic__phone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .65rem .7rem;
    border-radius: .65rem;
    background: #f4f8fb;
    border: 1px solid #e8eef5;
    margin-bottom: 1rem;
}

.nd-p-clinic__phone-main {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.nd-p-clinic__phone-main strong {
    display: block;
    font-size: .9375rem;
    font-weight: 800;
    color: var(--nd-text);
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
}

.nd-p-clinic__call {
    flex: none;
    padding: .3rem .7rem;
    border-radius: .5rem;
    background: #e2eaf3;
    color: var(--nd-primary);
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1.9;
    transition: background .16s ease, color .16s ease;
}

.nd-p-clinic__call:hover { background: var(--nd-primary); color: #fff; }

.nd-p-clinic__hours { margin-bottom: 1rem; }

.nd-p-hours {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-top: .3rem;
}

.nd-p-hours span {
    display: block;
    padding: .45rem .6rem;
    border-radius: .5rem;
    background: #f6f9fc;
    font-size: .75rem;
    line-height: 1.9;
    color: var(--nd-text-2);
    border: 1px solid #eef3f9;
    overflow-wrap: anywhere;
}

/* Map */
.nd-p-map { margin-bottom: 1rem; }

.nd-p-map__frame {
    position: relative;
    margin-top: .35rem;
    height: 160px;
    border-radius: .7rem;
    overflow: hidden;
    background: #eef2f7;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.nd-p-map__art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.nd-p-map__pin {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -100%);
    width: 26px; height: 26px;
    color: var(--nd-rose);
    filter: drop-shadow(0 4px 6px rgba(15, 23, 42, .25));
}
.nd-p-map__pin svg { width: 100%; height: 100%; }

.nd-p-map__overlay {
    position: absolute;
    inset-inline: .5rem;
    bottom: .5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
}

.nd-p-map__chip {
    display: inline-flex;
    align-items: center;
    padding: .2rem .55rem;
    border-radius: .4rem;
    background: rgba(255, 255, 255, .93);
    backdrop-filter: blur(6px);
    font-size: .625rem;
    font-weight: 700;
    color: var(--nd-text);
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: var(--nd-shadow-flat);
}

.nd-p-map__go {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem .6rem;
    border-radius: .4rem;
    background: var(--nd-primary);
    color: #fff;
    font-size: .625rem;
    font-weight: 700;
    line-height: 1.9;
    flex: none;
    box-shadow: var(--nd-shadow-flat);
}
.nd-p-map__go:hover { background: var(--nd-primary-hover); color: #fff; }
.nd-p-map__go svg { width: 13px; height: 13px; }

/* Insurers */
.nd-p-insurers__list {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .35rem;
}

.nd-p-insurers__list span {
    padding: .2rem .6rem;
    border-radius: var(--nd-radius-full);
    background: var(--nd-secondary-tint);
    border: 1px solid #d1fae5;
    color: #065f46;
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1.9;
}

/* Guarantee */
.nd-p-guarantee {
    background: linear-gradient(160deg, #eaf2fb, #e2ecf7);
    border: 1px solid #d8e5f2;
    border-radius: var(--nd-radius-xl);
    padding: 1.2rem;
}

.nd-p-guarantee__head {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--nd-primary);
    margin-bottom: .5rem;
}
.nd-p-guarantee__head svg { width: 22px; height: 22px; flex: none; }
.nd-p-guarantee__head h2 { margin: 0; font-size: .9375rem; color: var(--nd-primary-hover); }

.nd-p-guarantee p {
    margin: 0 0 .7rem;
    font-size: .8125rem;
    line-height: 2;
    color: var(--nd-text-2);
}

.nd-p-guarantee ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.nd-p-guarantee li {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .75rem;
    color: var(--nd-text-2);
}
.nd-p-guarantee li svg { width: 15px; height: 15px; color: var(--nd-secondary-strong); flex: none; }

/* --------------------------------------------------------------------------
   9. Reviews
   -------------------------------------------------------------------------- */
.nd-p-reviews { scroll-margin-top: calc(var(--nd-header-h) + 20px); }

.nd-p-reviews__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--nd-border);
    margin-bottom: 1.2rem;
}

.nd-p-reviews__title {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 .15rem;
    font-size: 1.125rem;
    line-height: 1.6;
}
.nd-p-reviews__title svg { width: 22px; height: 22px; color: var(--nd-primary); flex: none; }

.nd-p-reviews__head p {
    margin: 0;
    font-size: .8125rem;
    color: var(--nd-text-3);
    line-height: 1.9;
}

/* Review form */
.nd-p-reviewform { position: relative; }

.nd-p-reviewform > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
}
.nd-p-reviewform > summary::-webkit-details-marker { display: none; }

.nd-p-reviewform > form {
    margin-top: .8rem;
    padding: 1rem;
    border-radius: var(--nd-radius-md);
    background: #f7fafc;
    border: 1px solid var(--nd-border);
    display: flex;
    flex-direction: column;
    gap: .65rem;
    width: min(560px, 78vw);
}

.nd-p-reviewform__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
}

.nd-p-reviewform__note {
    margin: 0;
    padding: .5rem .7rem;
    border-radius: .5rem;
    background: var(--nd-secondary-tint);
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: .75rem;
    font-weight: 700;
}

/* Rating box */
.nd-p-ratingbox {
    display: grid;
    grid-template-columns: 158px minmax(0, 1fr);
    gap: 1.25rem;
    padding: 1.1rem;
    border-radius: var(--nd-radius-md);
    background: #f5f8fc;
    border: 1px solid #e8eef5;
    margin-bottom: 1.25rem;
}

.nd-p-ratingbox__total {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    text-align: center;
    padding-inline-end: 1.25rem;
    border-inline-end: 1px solid var(--nd-border);
}

.nd-p-ratingbox__total strong {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--nd-text);
}

.nd-p-ratingbox__total .nd-star svg { width: 16px; height: 16px; }

.nd-p-ratingbox__total > span {
    font-size: .6875rem;
    color: var(--nd-text-3);
}

.nd-p-ratingbox__bars {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    justify-content: center;
    min-width: 0;
}

.nd-p-metric__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    font-size: .75rem;
    color: var(--nd-text-2);
    margin-bottom: .2rem;
}

.nd-p-metric__top b { color: var(--nd-primary); font-weight: 800; white-space: nowrap; }

/* Review list */
.nd-p-reviewlist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.nd-p-review {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: 1rem;
    border-radius: var(--nd-radius-md);
    background: #f7fafc;
    border: 1px solid #e8eef5;
    min-width: 0;
    transition: box-shadow .18s ease, border-color .18s ease;
}

.nd-p-review:hover { box-shadow: var(--nd-shadow-raised); border-color: #dbe5ef; }

.nd-p-review__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    flex-wrap: wrap;
}

.nd-p-review__who {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.nd-p-review__avatar {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--nd-primary-soft);
    color: var(--nd-primary-hover);
    font-size: .75rem;
    font-weight: 800;
    flex: none;
}

.nd-p-review__who strong {
    display: block;
    font-size: .8125rem;
    line-height: 1.7;
    color: var(--nd-text);
}

.nd-p-review__who span {
    display: block;
    font-size: .6875rem;
    color: var(--nd-text-3);
}

.nd-p-review__text {
    margin: 0;
    font-size: .8125rem;
    line-height: 2.1;
    color: var(--nd-text-2);
    overflow-wrap: anywhere;
}

.nd-p-review__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
    padding-top: .5rem;
    border-top: 1px dashed var(--nd-border);
    font-size: .6875rem;
    color: var(--nd-text-3);
}

.nd-p-review__rec {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    color: var(--nd-secondary);
    font-weight: 700;
}
.nd-p-review__rec svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   10. Responsive
   -------------------------------------------------------------------------- */

/* Tablet / small laptop — rail drops under the main column */
@media (max-width: 1080px) {
    .nd-p-grid { grid-template-columns: minmax(0, 1fr); }
    .nd-p-aside { position: static; }
    .nd-p-hero__inner { grid-template-columns: minmax(0, 1fr); }
    .nd-p-scorecard {
        width: 100%;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    .nd-p-scorecard__top { flex: 0 0 auto; }
    .nd-p-scorecard__bar { flex: 1 1 200px; min-width: 0; }
    .nd-p-scorecard__cta { flex: 0 0 auto; width: auto; }
    .nd-p-scorecard__next { flex: 1 1 100%; }

    .nd-p-day { flex-basis: calc((100% - 4 * .55rem) / 5); }
    .nd-p-slots { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .nd-p-hero { padding: 1.15rem; }
    .nd-p-card { padding: 1.15rem; }
    .nd-p-reviewlist { grid-template-columns: minmax(0, 1fr); }
    .nd-p-ratingbox { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .nd-p-ratingbox__total {
        padding-inline-end: 0;
        padding-bottom: .85rem;
        border-inline-end: 0;
        border-bottom: 1px solid var(--nd-border);
    }
    .nd-p-reviewform > form { width: 100%; }
}

@media (max-width: 760px) {
    .nd-p-topbar__inner { flex-direction: column; align-items: flex-start; gap: .6rem; }
    .nd-p-hero__main { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
    .nd-p-hero__photo { width: 104px; }
    .nd-p-hero__frame { width: 104px; height: 104px; }
    .nd-p-hero__img--initial { font-size: 2.15rem; }
    .nd-p-hero__facts { gap: .25rem .7rem; font-size: .75rem; }
    .nd-p-hero__facts li + li::before { display: none; }
    .nd-p-book__head { flex-direction: column; align-items: stretch; }
    .nd-p-tabs { width: 100%; }
    .nd-p-tab { flex: 1 1 auto; }
    .nd-p-patient__grid { grid-template-columns: minmax(0, 1fr); }
    .nd-p-summary { flex-direction: column; align-items: stretch; }
    /* flex-basis maps to HEIGHT in a column flex container — reset it or the
       summary grows by 260px of dead space. */
    .nd-p-summary__info { flex: 0 1 auto; }
    .nd-p-submit { width: 100%; }
    .nd-p-reviewform__grid { grid-template-columns: minmax(0, 1fr); }
    .nd-p-services { grid-template-columns: minmax(0, 1fr); }
    .nd-p-reviews__head { flex-direction: column; align-items: stretch; }

    .nd-p-day { flex-basis: calc((100% - 3 * .55rem) / 4); }
    .nd-p-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .nd-p { padding-bottom: 2.5rem; }
    .nd-p-body { gap: 1rem; padding-top: 1rem; }
    .nd-p-hero { padding: 1rem; border-radius: var(--nd-radius-lg); }
    .nd-p-card { padding: 1rem; border-radius: var(--nd-radius-lg); }
    .nd-p-hero__titlerow h1 { font-size: 1.25rem; }
    .nd-p-hero__spec { font-size: .8125rem; }
    .nd-p-code { font-size: .6875rem; }
    .nd-p-scorecard { padding: .9rem; }
    .nd-p-scorecard__num strong { font-size: 1.35rem; }
    .nd-p-day { flex-basis: calc((100% - 2 * .45rem) / 2.7); min-height: 104px; padding: .6rem .5rem; }
    .nd-p-day__num { font-size: 1.15rem; }
    .nd-p-day__free { font-size: .5625rem; padding-inline: .2rem; }
    .nd-p-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
    .nd-p-slot__time { font-size: .875rem; }
    .nd-p-slot__state { font-size: .5625rem; }
    .nd-p-scorecard__cta { width: 100%; }
    .nd-p-hero__text { gap: .5rem; }
    .nd-p-hero__photo { width: 92px; }
    .nd-p-hero__frame { width: 92px; height: 92px; }
    .nd-p-hero__img--initial { font-size: 1.9rem; }
    .nd-p-hero__stamp { font-size: .625rem; padding: .15rem .45rem; }
    .nd-p-summary { padding: .85rem; }
    .nd-p-summary__value { font-size: .875rem; }
    .nd-p-submit { padding: .75rem 1rem; font-size: .875rem; }
    .nd-p-map__frame { height: 140px; }
    .nd-p-ratingbox { padding: .9rem; }
    .nd-p-ratingbox__total strong { font-size: 1.75rem; }
    .nd-p-review { padding: .85rem; }
    .nd-p-clinic__phone { flex-direction: column; align-items: stretch; gap: .5rem; }
    .nd-p-clinic__call { text-align: center; }
}

@media (max-width: 380px) {
    .nd-p-dates__strip { gap: .45rem; }
    .nd-p-day { flex-basis: calc((100% - .45rem) / 2.2); min-height: 98px; }
    .nd-p-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .nd-p *,
    .nd-p *::before,
    .nd-p *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* =========================================================================
   Booking tracking page (/track/) — reuses the .nd-p-* namespace.
   ====================================================================== */

.nd-p-kv {
    display: grid;
    gap: 0;
    margin: 0;
}

.nd-p-kv > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .6rem 0;
    border-top: 1px dashed var(--nd-border);
    font-size: .875rem;
}

.nd-p-kv > div:first-child { border-top: 0; }

.nd-p-kv dt {
    margin: 0;
    color: var(--nd-text-3);
    font-weight: 500;
    flex: none;
}

.nd-p-kv dd {
    margin: 0;
    font-weight: 700;
    color: var(--nd-text);
    text-align: left;
    word-break: break-word;
}

.nd-p-status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .8rem;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 700;
    background: #d1fae5;
    color: #047857;
    white-space: nowrap;
}

.nd-p-status.is-cancelled {
    background: var(--nd-rose-tint);
    color: #9f1239;
}

.nd-btn--danger {
    --_bg: #e11d48;
    --_fg: #fff;
    --_bd: #e11d48;
}

.nd-btn--danger:hover {
    background: #be123c;
    color: #fff;
}

/* The tracking form and the result card share one column width. */
.nd-p-card form.nd-p-form,
form.nd-p-card {
    max-width: 640px;
}

/* Bot protection (inc/captcha.php) ---------------------------------------- */

.nd-p-captcha {
    margin-top: .35rem;
}

.nd-p-captcha__row {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.nd-p-captcha__q {
    flex: none;
    padding: .4rem .75rem;
    border-radius: .5rem;
    background: #f1f5f9;
    border: 1px solid var(--nd-border);
    font-size: 1rem;
    font-weight: 800;
    color: var(--nd-text);
    letter-spacing: .02em;
}

.nd-p-captcha .nd-p-field input,
.nd-p-captcha input[type="text"] {
    max-width: 96px;
    text-align: center;
    font-weight: 700;
}

/* Honeypot: invisible to people, visible to naive bots. Kept at the inline
   start edge and clipped instead of shifted -9999px, which would widen the
   RTL document and leave a blank horizontal scroll area. */
.nd-hp {
    position: absolute !important;
    inset-inline-start: 0 !important;
    top: auto !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    opacity: 0;
    pointer-events: none;
}
