/* ============================================================
   PRM (Prospect & Meet-and-Greet) — visual pass to match the
   Appointments feature's own Orbit design tokens (see
   docs/superpowers/specs/2026-09-01-prm-work-queue-and-detail-redesign-handoff.md).
   Scoped under .orbit-prm so Prospecting-specific classes (.mng-slot,
   .mg-status, etc.) keep working unchanged.
   Supersedes the earlier green/violet/teal palette from
   docs/superpowers/specs/2026-07-27-prospecting-ui-prototype-alignment-design.md
   §3 — see that doc's own superseded-by note.
   ============================================================ */

.orbit-prm {
    --primary-rgb: 132, 90, 223;     /* Appointments-aligned purple #845ADF */
    --secondary-rgb: 35, 183, 229;   /* Appointments-aligned cyan #23B7E5 — Expecting Parent accents */
    --tertiary-rgb: var(--primary-rgb); /* M&G-specific highlighting reuses primary; the design
                                            handoff defines no separate Meet & Greet token */
    --success-rgb: 38, 191, 148;     /* #26BF94 */
    --info-rgb: 73, 182, 245;        /* confirmed against the design handoff mockup (SFMC chip, task-status icon) */
    --warning-rgb: 245, 184, 73;     /* #F5B849 */
    --danger-rgb: 230, 83, 60;       /* #E6533C */

    --primary: rgb(var(--primary-rgb));
    --secondary: rgb(var(--secondary-rgb));
    --tertiary: rgb(var(--tertiary-rgb));
    --success: rgb(var(--success-rgb));
    --info: rgb(var(--info-rgb));
    --warning: rgb(var(--warning-rgb));
    --danger: rgb(var(--danger-rgb));

    --primary-01: rgba(var(--primary-rgb), 0.1);
    --primary-03: rgba(var(--primary-rgb), 0.3);
    --secondary-01: rgba(var(--secondary-rgb), 0.1);
    --secondary-03: rgba(var(--secondary-rgb), 0.3);
    --tertiary-01: rgba(var(--tertiary-rgb), 0.1);
    --tertiary-03: rgba(var(--tertiary-rgb), 0.3);
    --success-01: rgba(var(--success-rgb), 0.1);
    --success-03: rgba(var(--success-rgb), 0.3);
    --info-01: rgba(var(--info-rgb), 0.1);
    --info-03: rgba(var(--info-rgb), 0.3);
    --warning-01: rgba(var(--warning-rgb), 0.12);
    --warning-03: rgba(var(--warning-rgb), 0.35);
    --danger-01: rgba(var(--danger-rgb), 0.1);
    --danger-03: rgba(var(--danger-rgb), 0.3);

    --fg-1: #333335;
    --fg-2: #536485;
    --fg-3: #8c9097;
    --bg-surface: #ffffff;
    --bg-surface-3: #f3f6f8;
    --border: #e8ecf0;

    --radius-lg: 0.5rem;
    --radius-pill: 50rem;
    --shadow-card: 0 0.125rem 0 rgba(10, 10, 10, 0.04);

    /* Re-theme MudBlazor's own palette variables so every Mud component within
       .orbit-prm (buttons, outlined chips, progress bars, focus rings) follows
       the Appointments-aligned palette automatically, with no per-component overrides. */
    --mud-palette-primary: var(--primary);
    --mud-palette-primary-text: #fff;
    --mud-palette-primary-darken: #6a3fc0;
    --mud-palette-primary-lighten: #a684e8;
    --mud-palette-secondary: var(--secondary);
    --mud-palette-secondary-text: #fff;
    --mud-palette-secondary-darken: #1a8fb8;
    --mud-palette-secondary-lighten: #6bcdef;
    --mud-palette-tertiary: var(--tertiary);
    --mud-palette-tertiary-text: #fff;
    --mud-palette-tertiary-darken: #6a3fc0;
    --mud-palette-tertiary-lighten: #a684e8;

    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--fg-1);
}

/* ---------- Page header ---------- */
.orbit-prm .prm-page-head {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.orbit-prm .prm-page-head h1,
.orbit-prm .prm-page-head .mud-typography-h4 {
    font-size: 1.375rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
    color: var(--fg-1);
}

.orbit-prm .prm-page-sub {
    font-size: 0.8125rem;
    color: var(--fg-3);
}

/* ---------- Filter bar as a card, not a grey block ---------- */
.orbit-prm .prm-filterbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.orbit-prm .prm-filter-spacer {
    flex: 1 1 auto;
}

/* ---------- Scope toggle (My Assigned / All SQLs) ---------- */
.orbit-prm .scope-toggle {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.1875rem;
    background: var(--bg-surface-2, var(--bg-surface));
    flex-shrink: 0;
}

.orbit-prm .scope-btn {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--fg-2);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.4375rem 0.75rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.orbit-prm .scope-btn:hover {
    color: var(--fg-1);
}

.orbit-prm .scope-btn.ac {
    background: var(--mud-palette-primary, #845adf);
    color: #fff;
    font-weight: 700;
}

/* ---------- Native filter selects (matches the prototype's .fsel control) ---------- */
.orbit-prm .prm-fsel {
    appearance: none;
    -webkit-appearance: none;
    height: 29px;
    min-width: 150px;
    padding: 0 1.75rem 0 0.625rem;
    font-size: 0.71875rem;
    font-weight: 500;
    color: var(--fg-1);
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 7px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888C97' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
}

.orbit-prm .prm-fsel:focus {
    outline: none;
    border-color: var(--mud-palette-primary, #845adf);
}

/* ---------- Queue table, built on MudDataGrid — matches the ServiceActions
   convention (Components/Pages/ServiceActions/ServiceActionsTable.razor +
   wwwroot/service-actions/service-actions.css) instead of a hand-rolled CSS grid. ---------- */
.orbit-prm .prm-queue-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem 0.75rem;
    margin-bottom: 0.75rem;
}

.orbit-prm .prm-filter-toggle {
    flex-shrink: 0;
}

/* MudButtonGroup's "override-styles" CSS forces child button backgrounds to
   `inherit` and their borders to reference --mud-palette-primary-rgb (which
   this page does not re-theme), so per-button Color/Variant alone cannot
   produce a visibly distinct active/inactive state here. Force it explicitly
   — solid fill for the active (Filled) button, plain outline for the inactive
   (Outlined) one — matching the reference prototype's segmented toggle, which
   uses the Prospecting-specific violet accent (--secondary) for this scope
   toggle rather than the global brand green. */
.orbit-prm .prm-filter-toggle .mud-button-root.mud-button-filled {
    background-color: var(--secondary) !important;
    color: #fff !important;
    border-color: var(--secondary) !important;
    font-weight: 700;
}

.orbit-prm .prm-filter-toggle .mud-button-root.mud-button-outlined {
    background-color: transparent !important;
    color: var(--fg-2) !important;
    border-color: var(--border) !important;
    font-weight: 500;
}

/* Outlined MudSelect, unlabeled (the "All Locations"/"All Outcomes" option
   text stands in for a label, matching the reference prototype's native
   .fsel selects) — sized and bordered to match .prm-filter-toggle so the
   whole filter row sits on one visual baseline instead of the select's
   default label row pushing it taller than the toggle buttons. */
.orbit-prm .prm-filter-select {
    max-width: 200px;
    flex-shrink: 0;
}

/* MudSelect's actual flex-item child in the filter bar isn't .prm-filter-select (that class sits
   one level deeper, on the inner mud-input-control) — it's this "mud-select" wrapper div, which
   MudBlazor defaults to flex-grow:1 with no width cap. Left unconstrained, the wrapper stretches
   to fill the row while the 200px-capped box inside it stays put, leaving a big dead gap after
   each control before the next one starts. */
.orbit-prm .prm-queue-filters > .mud-select {
    flex-grow: 0;
    max-width: 200px;
}

.orbit-prm .prm-filter-select .mud-input-control {
    margin-top: 0;
}

.orbit-prm .prm-filter-select .mud-input-outlined {
    min-height: 2.25rem;
    border-radius: 7px;
}

.orbit-prm .prm-filter-select .mud-input-outlined-border {
    /* !important + the extra .mud-input-outlined class: the app-wide Orbit.DesignSystem
       stylesheet also sets this border-color with !important at equal specificity (3 classes) and
       wins on source order alone — chaining one more class here (4) beats it outright regardless
       of load order. Same cascade issue already worked around for .mud-chip padding above. */
    border-color: var(--border) !important;
}

.orbit-prm .prm-filter-select .mud-input-outlined .mud-input-outlined-border {
    border-color: var(--border) !important;
}

.orbit-prm .prm-filter-select:hover .mud-input-outlined-border {
    border-color: var(--fg-3) !important;
}

.orbit-prm .prm-filter-select:hover .mud-input-outlined .mud-input-outlined-border {
    border-color: var(--fg-3) !important;
}

/* Same cascade fight as the hover rules above: Orbit.DesignSystem's app-wide border-color
   !important wins on source order at equal specificity, so the focus ring needs the same
   .mud-input-outlined class stacked on to beat it. Mirrors the shared OrbitMudSelect/
   OrbitMudTextField focus-within treatment (orbit-controls.css) that this raw MudSelect never
   picked up since it isn't wrapped in that shared component. */
.orbit-prm .prm-filter-select:focus-within .mud-input-outlined-border {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-01);
}

.orbit-prm .prm-filter-select:focus-within .mud-input-outlined .mud-input-outlined-border {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-01);
}

.orbit-prm .prm-filter-select .mud-input-slot {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--fg-1);
}

/* Pins the Refresh button to the end of whichever wrap line it lands on once the filter row
   (three selects plus search and pills) no longer fits on a single line. */
.orbit-prm .prm-filter-trailing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.orbit-prm .prm-queue-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    background: var(--bg-surface);
    overflow: hidden;
}

.orbit-prm .prm-q-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--fg-1);
    line-height: 1.3;
}

.orbit-prm .prm-q-line {
    font-size: 0.75rem;
    color: var(--fg-1);
    line-height: 1.3;
}

.orbit-prm .prm-q-sub {
    font-size: 0.6875rem;
    color: var(--fg-3);
    line-height: 1.3;
}

.orbit-prm .prm-q-lost {
    color: var(--danger, #d64545);
}

/* Small top gap between the M&G date line and its status pill below it. */
.orbit-prm .prm-q-status-chip {
    margin-top: 0.1875rem;
}

.orbit-prm .prm-empty {
    padding: 2rem 0.875rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--fg-3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.orbit-prm .prm-empty i {
    font-size: 1.75rem;
    color: #dbdfe1;
}

/* ---------- Summary tiles: informational KPI cards above the toolbar (not clickable) ---------- */
.orbit-prm .prm-summary-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(9rem, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.orbit-prm .prm-tile {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 0.625rem;
    row-gap: 0.125rem;
    text-align: left;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 0.75rem 0.875rem;
    font-family: inherit;
}

.orbit-prm .prm-tile-icon {
    grid-row: 1 / span 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary-01);
    color: var(--primary);
    font-size: 1rem;
}

.orbit-prm .prm-tile-icon-info {
    background: var(--info-01);
    color: var(--info);
}

.orbit-prm .prm-tile-label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-3);
}

.orbit-prm .prm-tile-value {
    font-size: 1.3125rem;
    font-weight: 600;
    color: var(--fg-1);
    line-height: 1.2;
}

.orbit-prm .prm-tile-sub {
    font-size: 0.6875rem;
    color: var(--fg-3);
    margin-left: 0.375rem;
}

/* ---------- Search box + pill filters, replacing the dropdown Type/Outcome filters ---------- */
.orbit-prm .prm-search-field {
    max-width: 240px;
    flex-shrink: 0;
}

.orbit-prm .prm-pill-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.orbit-prm .prm-pill {
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3125rem 0.75rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    background: #f2f4f5;
    color: var(--fg-2);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.1s ease;
}

.orbit-prm .prm-pill:hover {
    background: #e6e9eb;
}

.orbit-prm .prm-pill-active {
    background: var(--primary);
    color: #fff;
}

/* ---------- Prospect cell (Work Queue row identity) ---------- */
.orbit-prm .prm-q-prospect {
    padding-left: 0.625rem;
}

.orbit-prm .prm-not-on-file {
    display: block;
    padding: 0.5rem 0.25rem 0;
}

/* MudDataGrid overrides — strip MudBlazor's own card chrome (the .prm-queue-card
   wrapper already provides border/shadow/radius) and restyle head/body cells to
   match the dense queue-table look. */
.orbit-prm .prm-data-grid { border-radius: 0; box-shadow: none; background: transparent; }
.orbit-prm .prm-data-grid .mud-table-container { overflow-x: auto; }
.orbit-prm .prm-data-grid .mud-data-grid-toolbar { display: none; }

.orbit-prm .prm-data-grid .mud-table-head .mud-table-cell {
    padding: 0.625rem 0.875rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-3);
    background: var(--bg-surface-3);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.orbit-prm .prm-data-grid .mud-table-sort-label,
.orbit-prm .prm-data-grid .column-header-sort-icon { display: none; }

.orbit-prm .prm-data-grid .mud-table-body .mud-table-row .mud-table-cell {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    color: var(--fg-1);
    border-bottom: 1px solid var(--border);
    border-top: none;
    cursor: pointer;
    transition: background 0.1s ease;
}

.orbit-prm .prm-data-grid .mud-table-body .mud-table-row:last-child .mud-table-cell {
    border-bottom: none;
}

.orbit-prm .prm-data-grid .mud-table-body .mud-table-row:hover .mud-table-cell {
    background: var(--bg-surface-3);
}

/* Eight-column layout (255/125/125/120/175/155/155/180 = 1290px);
   the card's own overflow-x:auto (above) takes over below the available viewport rather than
   clipping content. */
.orbit-prm .prm-data-grid .prm-col-prospect { width: 255px; min-width: 255px; }
.orbit-prm .prm-data-grid .prm-col-status { width: 125px; min-width: 125px; }
.orbit-prm .prm-data-grid .prm-col-type { width: 125px; min-width: 125px; }
.orbit-prm .prm-data-grid .prm-col-duedate {
    width: 120px;
    min-width: 120px;
    white-space: nowrap;
}
.orbit-prm .prm-data-grid .prm-col-nextstep { width: 175px; min-width: 175px; }
.orbit-prm .prm-data-grid .prm-col-meetandgreet { width: 155px; min-width: 155px; }
.orbit-prm .prm-data-grid .prm-col-location { width: 155px; min-width: 155px; }
.orbit-prm .prm-data-grid .prm-col-lastactivity {
    width: 180px;
    min-width: 180px;
    white-space: nowrap;
}

.orbit-prm .prm-data-grid .mud-table-pagination { border-top: 1px solid var(--border); }

/* This codebase uses Color="Color.Secondary" on MudText to mean "muted caption
   text", but the theme's Secondary is the cyan accent (#23B7E5) — right for
   accents, wrong for muted helper text. Re-tone it to the design system's
   --fg-3 muted gray within the PRM area only. */
.orbit-prm .mud-secondary-text {
    color: var(--fg-3) !important;
}

/* ---------- Soft, tinted badge pills instead of solid filled chips ---------- */
.orbit-prm .mud-chip {
    height: auto;
    min-height: 1.5rem;
    /* !important: MudBlazor's own .mud-chip-size-small rule sets padding/line-height with equal
       or higher selector specificity and otherwise wins the cascade (matches the established
       !important pattern already used below for mud-chip-filled color overrides). */
    padding: 0.25rem 0.625rem !important;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    line-height: 1 !important;
    /* Inside a table cell the chip is a flex/table layout child that can otherwise be squeezed
       narrower than its own text (the label then silently clips) — never shrink below content. */
    flex-shrink: 0;
    width: fit-content;
}

.orbit-prm .mud-chip .mud-chip-content {
    padding: 0;
    flex-shrink: 0;
}

.orbit-prm .mud-chip-filled.mud-chip-color-primary {
    background: var(--primary-01) !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary-03);
}

.orbit-prm .mud-chip-filled.mud-chip-color-secondary {
    background: var(--secondary-01) !important;
    color: var(--secondary) !important;
    border: 1px solid var(--secondary-03);
}

.orbit-prm .mud-chip-filled.mud-chip-color-success {
    background: var(--success-01) !important;
    color: var(--success) !important;
    border: 1px solid var(--success-03);
}

.orbit-prm .mud-chip-filled.mud-chip-color-warning {
    background: var(--warning-01) !important;
    color: #92400e !important;
    border: 1px solid var(--warning-03);
}

.orbit-prm .mud-chip-filled.mud-chip-color-error {
    background: var(--danger-01) !important;
    color: var(--danger) !important;
    border: 1px solid var(--danger-03);
}

.orbit-prm .mud-chip-filled.mud-chip-color-info {
    background: var(--info-01) !important;
    color: var(--info) !important;
    border: 1px solid var(--info-03);
}

.orbit-prm .mud-chip-filled.mud-chip-color-tertiary {
    background: var(--tertiary-01) !important;
    color: var(--tertiary) !important;
    border: 1px solid var(--tertiary-03);
}

.orbit-prm .mud-chip-filled.mud-chip-color-default {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #d1d5db;
}

/* ---------- Detail-page content cards (Contact Info, Children, Notes, SQL
   Summary, Outcome, Meet & Greet, Checklist, Activity Log, profile header) —
   flat, bordered surface matching the prototype's .card, using the same
   radius/shadow/border tokens as the queue page's .prm-queue-card instead of
   MudBlazor's default elevation shadow. ---------- */
.orbit-prm .prm-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    background: var(--bg-surface);
}

.orbit-prm .prm-card-title {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--fg-3);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* ---------- Prospect detail tabs (manual tab bar — see ProspectDetail.razor
   for why this isn't MudTabs) ---------- */
.orbit-prm .prm-tabs {
    margin-top: 1rem;
}

.orbit-prm .prm-tab-bar {
    display: flex;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
}

.orbit-prm .prm-tab {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    padding: 0.625rem 0.125rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--fg-3);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.orbit-prm .prm-tab:hover {
    color: var(--fg-1);
}

.orbit-prm .prm-tab-active,
.orbit-prm .prm-tab-active:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.orbit-prm .prm-tab-count {
    background: var(--bg-surface-3);
    color: var(--fg-3);
    border-radius: var(--radius-pill);
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.0625rem 0.4375rem;
    line-height: 1.4;
}

.orbit-prm .prm-tab-active .prm-tab-count {
    background: var(--primary-01);
    color: var(--primary);
}

/* ---------- Compact, cleaner dropdowns (MudSelect) ---------- */
.orbit-prm .mud-input {
    border-radius: var(--radius-lg);
}

.orbit-prm .mud-select .mud-input-outlined .mud-input-outlined-border {
    border-color: var(--border);
}

.orbit-prm .mud-input-outlined:not(.mud-input-error):hover .mud-input-outlined-border {
    border-color: var(--fg-3);
}

/* Purple focus ring, mirroring the shared OrbitMudTextField/OrbitMudSelect treatment
   (orbit-controls.css: .orbit-mud-field .mud-input:focus-within) that Prospecting's plain
   MudTextField/MudSelect usages (search box, note/channel fields, dialog selects) never
   inherited since none of them are wrapped in that shared component.
   border-color needs !important: same cascade fight documented on .prm-filter-select above —
   the app-wide Orbit.DesignSystem stylesheet sets this border-color with !important at equal
   specificity and wins on source order alone otherwise (verified: box-shadow alone applied fine,
   border-color silently didn't until !important was added here). */
.orbit-prm .mud-input-outlined:not(.mud-input-error):focus-within .mud-input-outlined-border {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-01);
}

.orbit-prm .mud-input-outlined.mud-shrink .mud-input-outlined-border {
    border-width: 1px;
}

.orbit-prm .mud-input-label {
    font-size: 0.75rem;
    color: var(--fg-3);
}

.orbit-prm .mud-input-root {
    font-size: 0.8125rem;
}

/* MudBlazor's own built-in rules for select/adorned inputs are more specific than a plain
   .mud-input-slot selector and otherwise win, leaving inconsistent (and cramped-looking)
   horizontal padding across the outlined selects and the plain Reason textarea. */
.orbit-prm .mud-input-slot {
    padding: 0.5rem 0.75rem !important;
}

.orbit-prm .mud-select .mud-select-input {
    min-height: unset;
}

.orbit-prm .mud-list-item {
    font-size: 0.8125rem;
    min-height: 2.25rem;
}

/* ---------- Acquisition summary strip (confirmed against the design handoff mockup — was
   still the superseded 2026-07-27 prototype's lavender/cyan styling before this fix) ---------- */
.orbit-prm .prm-acq-card {
    background: var(--bg-surface-3);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 0.5625rem 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.orbit-prm .prm-acq-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.orbit-prm .prm-acq-lbl {
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--fg-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.orbit-prm .prm-acq-val {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--fg-1);
}

.orbit-prm .prm-acq-sep {
    width: 1px;
    height: 1.75rem;
    background: var(--border);
}

/* Qualified By soft-tint pill pair (SFMC -> PRM (Prospect)), replacing solid MudChips */
.orbit-prm .prm-qualifier-chip {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-pill);
    font-size: 0.6875rem;
    font-weight: 500;
}

.orbit-prm .prm-qualifier-chip.source {
    background: var(--info-01);
    color: rgb(31, 137, 204);
}

.orbit-prm .prm-qualifier-chip.channel {
    background: var(--primary-01);
    color: rgb(107, 67, 196);
}

.orbit-prm .prm-qualifier-arrow {
    font-size: 0.8125rem;
    color: var(--fg-3);
}

/* ---------- Profile header contact meta row (matches the prototype's .ph-meta/.mi) ---------- */
.orbit-prm .prm-meta-row {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 0.375rem;
    flex-wrap: wrap;
}

.orbit-prm .prm-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.71875rem;
    color: var(--fg-2);
    padding: 0 0.625rem 0 0;
}

.orbit-prm .prm-meta-item:not(:last-child) {
    border-right: 1px solid var(--border);
    margin-right: 0.625rem;
}

.orbit-prm .prm-meta-lbl {
    font-size: 0.625rem;
    color: var(--fg-3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.orbit-prm .prm-meta-val {
    color: var(--fg-1);
    font-weight: 600;
}

/* ---------- SFMC Handoff Record card ---------- */
.orbit-prm .prm-handoff-card {
    border-left: 3px solid #0ea5e9;
    background: #f0f9ff;
}

.orbit-prm .prm-ir-value {
    font-weight: 700;
    color: var(--fg-1);
}

/* ---------- Lost Reason row (Outcome card) ---------- */
.orbit-prm .prm-lost-reason-row {
    background: var(--danger-01);
    border: 1px solid var(--danger-03);
    border-radius: var(--radius-lg);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* ---------- Day-grouped activity timeline ---------- */
.orbit-prm .prm-tl-day-header {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--fg-2);
    padding: 0.5rem 0 0.25rem;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 0.25rem;
}

.orbit-prm .prm-tl-day-count {
    font-weight: 500;
    color: var(--fg-3);
    text-transform: none;
    letter-spacing: normal;
    margin-left: 0.375rem;
}

/* Activity Log icon circle — soft-tint per event kind, confirmed against the design handoff
   mockup (30px circle, ~15px glyph, 10-15% alpha tint). */
.orbit-prm .prm-tl-icon {
    width: 1.875rem;
    height: 1.875rem;
    flex: 0 0 auto;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
}

.orbit-prm .prm-tl-icon.primary {
    background: var(--primary-01);
    color: var(--primary);
}

.orbit-prm .prm-tl-icon.info {
    background: var(--info-01);
    color: var(--info);
}

.orbit-prm .prm-tl-entry.system {
    opacity: 0.72;
}

.orbit-prm .prm-tl-badge {
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 0.0625rem 0.3125rem;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    margin-left: 0.375rem;
}

.orbit-prm .prm-tl-badge.sys {
    background: var(--bg-surface-3);
    color: var(--fg-2);
    border: 1px solid var(--border);
}

.orbit-prm .prm-tl-badge.handoff {
    background: var(--secondary-01);
    color: var(--secondary);
    border: 1px solid var(--secondary-03);
}

/* ---------- Reschedule dialog: stepper, date strip, slot grid, compare panel ---------- */
.orbit-prm .prm-stepper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.orbit-prm .prm-step {
    display: flex;
    align-items: center;
    gap: 0.4375rem;
    color: var(--fg-3);
    font-size: 0.8125rem;
}

.orbit-prm .prm-step b {
    width: 1.5625rem;
    height: 1.5625rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--bg-surface-3);
    color: var(--fg-2);
}

.orbit-prm .prm-step-active {
    color: var(--tertiary);
    font-weight: 700;
}

.orbit-prm .prm-step-active b {
    background: var(--tertiary);
    color: #fff;
}

.orbit-prm .prm-date-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(3.25rem, 1fr));
    gap: 0.5rem;
    margin: 0.625rem 0 1rem;
}

.orbit-prm .prm-date {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--fg-2);
}

.orbit-prm .prm-date-active {
    background: var(--tertiary-01);
    color: var(--tertiary);
    border-color: var(--tertiary);
    font-weight: 700;
}

.orbit-prm .prm-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.375rem, 1fr));
    gap: 0.5625rem;
}

.orbit-prm .prm-slot {
    border: 1px solid var(--tertiary-03);
    background: var(--tertiary-01);
    border-radius: var(--radius-lg);
    text-align: left;
    color: var(--fg-1);
}

.orbit-prm .prm-slot-selected {
    background: var(--tertiary-01);
    border: 2px solid var(--tertiary);
}

.orbit-prm .prm-compare {
    display: grid;
    grid-template-columns: 1fr 2.25rem 1fr;
    gap: 0.625rem;
    align-items: center;
    margin: 0.875rem 0;
}

.orbit-prm .prm-compare-col {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    background: var(--bg-surface-3);
    /* CURRENT often has a 3rd staff-name line that NEW's slot may not (business-hours-derived
       slots can have no assigned staff) -- reserve the same height either way so the two boxes
       never look mismatched side by side. */
    min-height: 5.25rem;
}

.orbit-prm .prm-compare-new {
    background: var(--tertiary-01);
    border-color: var(--tertiary-03);
}

.orbit-prm .prm-compare-label {
    color: var(--fg-3);
    font-size: 0.75rem;
}

.orbit-prm .prm-compare-arrow {
    text-align: center;
    color: var(--fg-3);
    font-size: 1.5rem;
}

/* ---------- Meet & Greet card and dialog action buttons: match the
   reschedule/cancel prototype's sentence-case, rounded button treatment
   instead of MudBlazor's default all-caps styling. ---------- */
.orbit-prm .prm-card-actions {
    justify-content: flex-end;
}

.orbit-prm .prm-btn {
    text-transform: none;
    border-radius: var(--radius-lg);
    font-weight: 650;
    letter-spacing: normal;
}

/* MudDialog's own .mud-dialog-actions is flex-wrap:nowrap by default. Without this override,
   the submit-time progress bar below (flex-basis:100%) can't actually wrap onto its own line as
   intended — instead nowrap forces the buttons to shrink to fit alongside it (confirmed via
   computed width: Back/Confirm shrank from their natural 66px/168px down to 64px/144px). Scoped
   to .orbit-prm only. */
.orbit-prm .mud-dialog-actions {
    flex-wrap: wrap;
}

/* Forces the submit-time progress bar onto its own full-width row above the
   dialog action buttons, rather than being squeezed between them. */
.orbit-prm .prm-submit-progress {
    flex-basis: 100%;
    margin-bottom: 0.5rem;
}

/* ---------- Reschedule slot-picker: embedded month calendar (left) +
   time-slot list (right), replacing the old horizontal date-strip. ---------- */
.mng-picker {
    display: grid;
    grid-template-columns: minmax(15rem, 1fr) minmax(12rem, 1fr);
    gap: 1.5rem;
    margin: 0.625rem 0 1rem;
}

@media (max-width: 40rem) {
    .mng-picker {
        grid-template-columns: 1fr;
    }
}

.mng-cal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mng-cal-month {
    font-weight: 700;
    min-width: 9rem;
    text-align: center;
}

.mng-cal-weekdays,
.mng-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    text-align: center;
}

.mng-cal-weekdays span {
    color: var(--fg-3);
    font-size: 0.75rem;
    font-weight: 700;
}

.mng-cal-cell {
    border: none;
    background: transparent;
    border-radius: 50%;
    aspect-ratio: 1;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0 auto;
    font-size: 0.875rem;
}

.mng-cal-cell-empty {
    visibility: hidden;
}

.mng-cal-cell-muted {
    color: var(--fg-3);
    opacity: 0.5;
}

.mng-cal-cell-active {
    color: var(--fg-1);
    cursor: pointer;
}

.mng-cal-cell-active:hover {
    background: var(--tertiary-01);
}

.mng-cal-cell-selected {
    background: var(--tertiary);
    color: #fff;
    font-weight: 700;
}

.mng-cal-caption {
    margin: 0.5rem 0 0;
    color: var(--fg-3);
    font-size: 0.75rem;
    text-align: center;
}

.mng-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
    gap: 0.5625rem;
}

.mng-slot {
    border: 1px solid var(--tertiary-03);
    background: var(--tertiary-01);
    border-radius: var(--radius-lg);
    color: var(--fg-1);
    text-transform: none;
}

/* Qualified against .mud-button-root so this reliably outranks MudBlazor's own
   default-variant classes (e.g. mud-button-text-default), which otherwise win the
   cascade over a same-specificity, single-class override and leave a "selected"
   slot visually identical to an unselected one. */
.mng-slot.mud-button-root.mng-slot-selected {
    background: var(--tertiary);
    border-color: var(--tertiary);
    color: #fff;
    font-weight: 600;
}

.mng-slots-staff {
    margin-top: 0.75rem;
    color: var(--fg-2);
    font-size: 0.875rem;
}


/* Location filter when the caller's scope is a single clinic (e.g. a Practice Manager): the scope
   is shown as a read-only label in the filter bar instead of a dropdown, since "All Locations"
   and "their clinic" are the same set. */
.orbit-prm .prm-location-locked {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 2.25rem;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-surface);
    color: var(--fg-2);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.orbit-prm .prm-location-locked i {
    color: var(--fg-3);
}

.orbit-prm .prm-no-clinic {
    margin: 0.5rem 0 1rem;
}
