/* ============================================================
   SureVisit Management — management.css
   WCAG 2.1 AA — all text on white: minimum 4.5:1 contrast
   ============================================================ */

/* ----------------------------------------------------------
   Side Navigation
---------------------------------------------------------- */
.svhm-side-nav {
    width: 220px;
    min-width: 180px;
    background: #ffffff;
    padding: 8px 0;
}

.svhm-side-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.svhm-side-nav__item {
    margin: 0;
    padding: 0;
    list-style: none;
}

.svhm-side-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #0047AB;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.svhm-side-nav__link:hover {
    background: #EBF2FF;
    color: #003A8C;
    border-left-color: #0047AB;
    text-decoration: none;
}

.svhm-side-nav__item--active .svhm-side-nav__link {
    background: #EBF2FF;
    color: #0047AB;
    border-left-color: #0047AB;
    font-weight: 700;
}

.svhm-side-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: inherit;
}

.svhm-side-nav__icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.svhm-side-nav__label {
    flex: 1;
    white-space: nowrap;
}

/* ----------------------------------------------------------
   Shared base
---------------------------------------------------------- */
.svhm-practice-header {
    margin-bottom: 24px;
}
.svhm-practice-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #000000;
}

/* Buttons */
.svhm-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    line-height: 1.4;
}
.svhm-btn-primary {
    background: #0047AB;
    color: #ffffff;
    border-color: #0047AB;
}
.svhm-btn-primary:hover {
    background: #003A8C;
    border-color: #003A8C;
}
.svhm-btn-secondary {
    background: #ffffff;
    color: #0047AB;
    border-color: #0047AB;
}
.svhm-btn-secondary:hover {
    background: #EBF2FF;
    border-color: #003A8C;
    color: #003A8C;
}
.svhm-btn-cancel {
    background: #c0392b;
    color: #ffffff;
    border-color: #c0392b;
}
.svhm-btn-cancel:hover {
    background: #a93226;
    border-color: #a93226;
}

/* ----------------------------------------------------------
   Setup Wizard
---------------------------------------------------------- */
.svhm-setup-wizard {
    max-width: 800px;
    margin-bottom: 48px;
    color: #000000;
}
.svhm-wizard-header {
    margin-bottom: 32px;
}
.svhm-wizard-header h2 {
    margin: 0 0 8px 0;
    color: #000000;
}
.svhm-wizard-header p {
    margin: 0;
    color: #333333;
    font-size: 15px;
}
.svhm-wizard-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
}
.svhm-step-status-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid #000000;
}
.svhm-step-complete .svhm-step-status-icon {
    background: #006400;
    color: #ffffff;
    border-color: #006400;
}
.svhm-step-incomplete .svhm-step-status-icon {
    background: #f4f4f4;
    color: #555555;
}
.svhm-step-content h3 {
    margin: 0 0 6px 0;
    font-size: 17px;
    color: #000000;
}
.svhm-step-content p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333333;
}
.svhm-step-status {
    font-size: 13px;
}
.svhm-complete { color: #006400; }
.svhm-incomplete { color: #b91c1c; }
.svhm-wizard-complete {
    background: #e6f4ea;
    border: 2px solid #006400;
    border-radius: 8px;
    padding: 24px;
    margin-top: 24px;
}
.svhm-wizard-complete h3 {
    margin: 0 0 8px 0;
    color: #006400;
}

/* ----------------------------------------------------------
   Practice Manager (ACF form wrapper)
---------------------------------------------------------- */
.svhm-practice-manager {
    max-width: 700px;
    color: #000000;
}
.svhm-practice-manager h2 {
    margin: 0 0 8px 0;
    color: #000000;
}
.svhm-practice-manager > p {
    color: #333333;
    margin-bottom: 24px;
}

/* ----------------------------------------------------------
   Provider Dashboard
---------------------------------------------------------- */
#svhm-provider-dashboard {
    color: #000000;
}
.svhm-dashboard-header {
    margin-bottom: 24px;
}
.svhm-dashboard-header h2 {
    margin: 0;
    color: #000000;
}

/* Filters */
.svhm-dashboard-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    background: #f9f9f9;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.svhm-dashboard-filters label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #000000;
}
.svhm-dashboard-filters input,
.svhm-dashboard-filters select {
    padding: 8px 10px;
    border: 2px solid #767676;
    border-radius: 4px;
    font-size: 14px;
    color: #000000;
    background: #ffffff;
    min-width: 140px;
}
.svhm-dashboard-filters input:focus,
.svhm-dashboard-filters select:focus {
    outline: 3px solid #005fcc;
    outline-offset: 1px;
}

/* Dashboard sections */
.svhm-dashboard-section {
    margin-bottom: 32px;
}
.svhm-dashboard-section h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #000000;
    border-bottom: 2px solid #000000;
    padding-bottom: 8px;
}

/* Appointment cards */
.svhm-appointment-card {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.svhm-appt-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
}
.svhm-appt-time {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
}
.svhm-appt-date {
    font-size: 13px;
    color: #555555;
    white-space: nowrap;
}
.svhm-appt-patient {
    font-weight: 600;
}
.svhm-appt-type {
    font-size: 13px;
    color: #333333;
}
.svhm-appt-status {
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.svhm-status-scheduled   { background: #dbeafe; color: #1e40af; }
.svhm-status-confirmed   { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.svhm-status-arrived     { background: #fef9c3; color: #854d0e; }
.svhm-status-completed   { background: #a7f3d0; color: #065f46; }
.svhm-status-cancelled   { background: #fee2e2; color: #991b1b; }
.svhm-status-no-show     { background: #ffe4e6; color: #9f1239; }

.svhm-appt-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.svhm-appt-actions .svhm-btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* ── Inline status selector ─────────────────────────────────── */
.svhm-status-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #EBF2FF;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23374151' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    color: #111827;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    height: 32px;
    padding: 0 28px 0 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-width: 160px;
}
.svhm-status-select:hover {
    border-color: #0047AB;
}
.svhm-status-select:focus {
    outline: none;
    border-color: #0047AB;
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.15);
}
.svhm-status-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.svhm-status-select-saved {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18) !important;
    transition: border-color 0s, box-shadow 0s;
}
.svhm-status-select-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18) !important;
    transition: border-color 0s, box-shadow 0s;
}
.svhm-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.svhm-no-appointments {
    font-size: 14px;
    color: #555555;
    padding: 16px 0;
}

/* Login/error messages */
.svhm-login-required,
.svhm-dashboard-error {
    padding: 16px 20px;
    border: 2px solid #000000;
    border-radius: 8px;
    font-size: 15px;
    color: #000000;
    background: #f9f9f9;
}

/* ----------------------------------------------------------
   Location Details Card
---------------------------------------------------------- */
.svhm-location-card {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    overflow: hidden;
    max-width: 600px;
    color: #000000;
}
.svhm-location-card-header {
    background: #e6f4f6;
    padding: 16px 20px;
    border-bottom: 2px solid #000000;
}
.svhm-location-card-header h2 {
    margin: 0;
    font-size: 20px;
    color: #000000;
}
.svhm-location-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.svhm-location-row {
    display: flex;
    gap: 10px;
    font-size: 15px;
}
.svhm-location-row strong {
    min-width: 80px;
    color: #000000;
}
.svhm-location-row a {
    color: #005fcc;
    text-decoration: underline;
}

/* ----------------------------------------------------------
   Practice Manager — ACF form field styling
   Overrides ACF's default admin-style appearance so the
   frontend form matches our design system.
---------------------------------------------------------- */
.svhm-practice-manager .acf-form,
.svhm-practice-manager .acf-fields {
    border: none;
    padding: 0;
    background: transparent;
}
.svhm-practice-manager .acf-field {
    padding: 0 0 20px 0;
    border-top: none !important;
}
.svhm-practice-manager .acf-label label {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 6px;
    display: block;
}
.svhm-practice-manager .acf-label .description,
.svhm-practice-manager .acf-field .description {
    font-size: 12px;
    color: #555555;
    margin-top: 4px;
}
.svhm-practice-manager .acf-input input[type="text"],
.svhm-practice-manager .acf-input input[type="email"],
.svhm-practice-manager .acf-input input[type="url"],
.svhm-practice-manager .acf-input input[type="number"],
.svhm-practice-manager .acf-input input[type="tel"],
.svhm-practice-manager .acf-input textarea,
.svhm-practice-manager .acf-input select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #767676;
    border-radius: 6px;
    font-size: 14px;
    color: #000000;
    background: #ffffff;
    box-sizing: border-box;
    box-shadow: none;
}
.svhm-practice-manager .acf-input input:focus,
.svhm-practice-manager .acf-input textarea:focus,
.svhm-practice-manager .acf-input select:focus {
    outline: 3px solid #005fcc;
    outline-offset: 1px;
    border-color: #005fcc;
}
.svhm-practice-manager .acf-input textarea {
    min-height: 100px;
    resize: vertical;
}
/* Hide ACF's own submit button — we render our own */
.svhm-practice-manager .acf-form-submit {
    display: none;
}

/* ----------------------------------------------------------
   Status badge — missing variants
---------------------------------------------------------- */
.svhm-status-checked-in   { background: #cffafe; color: #155e75; }
.svhm-status-arrived-late { background: #ffedd5; color: #9a3412; }
.svhm-status-in-room      { background: #ccfbf1; color: #0f5a4a; }
.svhm-status-in-progress  { background: #e0e7ff; color: #3730a3; }
.svhm-status-pending      { background: #f3f4f6; color: #374151; }
.svhm-status-rescheduled  { background: #ede9fe; color: #5b21b6; }

/* ----------------------------------------------------------
   Appointments Calendar
---------------------------------------------------------- */
.svhm-cal-wrapper {
    max-width: 900px;
    color: #000000;
    font-family: inherit;
}

/* Navigation bar */
.svhm-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.svhm-cal-nav-btn {
    white-space: nowrap;
}
.svhm-cal-month-select-wrap {
    flex: 1;
    text-align: center;
}
.svhm-cal-month-select {
    padding: 8px 12px;
    border: 2px solid #767676;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    background: #ffffff;
    cursor: pointer;
    max-width: 220px;
}
.svhm-cal-month-select:focus {
    outline: 3px solid #005fcc;
    outline-offset: 1px;
}

/* Accessible screen-reader only label */
.svh-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Calendar grid */
.svhm-cal-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 20px;
}
.svhm-cal-grid thead th {
    background: #0047AB;
    color: #ffffff !important;
    text-align: center;
    padding: 10px 4px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #003A8C;
}
.svhm-cal-day {
    border: 1px solid #d1d5db;
    vertical-align: top;
    height: 72px;
    padding: 6px;
    background: #ffffff;
}
.svhm-cal-empty {
    background: #f9fafb;
}
.svhm-cal-today {
    background: #eff6ff;
    border-color: #3b82f6;
}
.svhm-cal-selected {
    background: #dbeafe !important;
    border-color: #0047AB !important;
}
.svhm-cal-has-appts {
    background: #f0fdf4;
}

/* Day number (no appointments) */
.svhm-cal-day-num {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* Day button (has appointments) */
.svhm-cal-day-btn {
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
    border-radius: 4px;
}
.svhm-cal-day-btn:hover,
.svhm-cal-day-btn:focus {
    background: #dbeafe;
    outline: 2px solid #0047AB;
    outline-offset: -2px;
}
.svhm-cal-day-btn .svhm-cal-day-num {
    color: #0047AB;
    font-weight: 700;
}

/* Appointment count badge */
.svhm-cal-badge {
    display: inline-block;
    background: #0047AB;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 12px;
    line-height: 1.5;
}

/* ---- Day panel (appointment list for selected date) ---- */
.svhm-cal-day-panel {
    background: #ffffff;
    border: 2px solid #0047AB;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.svhm-cal-day-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.svhm-cal-day-panel-header h3 {
    margin: 0;
    font-size: 18px;
    color: #000000;
}
.svhm-cal-panel-close {
    background: none;
    border: 2px solid #767676;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
}
.svhm-cal-panel-close:hover,
.svhm-cal-panel-close:focus {
    background: #f3f4f6;
    outline: 2px solid #005fcc;
}

/* Day list appointment cards */
.svhm-day-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.svhm-cal-appt-card {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

/* Ensure hidden attribute is respected even when display is set by CSS */
.svhm-cal-modal-overlay[hidden],
.svhm-cal-day-panel[hidden] {
    display: none !important;
}

/* ---- Detail modal ---- */
.svhm-cal-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.svhm-cal-modal {
    background: #ffffff;
    border-radius: 10px;
    border: 2px solid #000000;
    padding: 28px;
    max-width: 560px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.svhm-cal-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: 2px solid #767676;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
}
.svhm-cal-modal-close:hover,
.svhm-cal-modal-close:focus {
    background: #f3f4f6;
    outline: 2px solid #005fcc;
}

/* Detail content */
.svhm-appt-detail-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-right: 36px; /* clear close btn */
}
.svhm-appt-detail-heading h3 {
    margin: 0;
    font-size: 20px;
    color: #000000;
}
.svhm-detail-status {
    font-size: 13px;
}
.svhm-appt-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}
.svhm-appt-detail-table th,
.svhm-appt-detail-table td {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    text-align: left;
    color: #000000;
}
.svhm-appt-detail-table th {
    background: #f3f4f6;
    font-weight: 600;
    width: 38%;
}

/* Status update section */
.svhm-status-update-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
}
.svhm-status-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.svhm-status-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 2px solid transparent;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s, box-shadow 0.15s;
    user-select: none;
}
.svhm-status-radio-label input[type="radio"] {
    accent-color: currentColor;
    width: 14px;
    height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}
.svhm-status-radio-label:hover {
    opacity: 0.8;
}
.svhm-status-radio-label:focus-within {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}
.svhm-status-radio-label.is-selected {
    box-shadow: 0 0 0 2px #000000;
}
.svhm-status-update-msg {
    font-size: 13px;
    color: #166534;
    margin: 4px 0 0 0;
    min-height: 18px;
}
.svhm-status-actions-row {
    margin-top: 8px;
}
.svhm-status-clear-btn {
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #000000;
    cursor: pointer;
    transition: background 0.15s;
}
.svhm-status-clear-btn:hover {
    background: #f3f4f6;
}

/* Staff action buttons row */
.svhm-appt-detail-staff-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/* Cancel confirmation panel */
.svhm-cancel-panel {
    background: #fef2f2;
    border: 2px solid #c0392b;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}
.svhm-cancel-panel h4 {
    margin: 0 0 8px 0;
    color: #991b1b;
    font-size: 16px;
}
.svhm-cancel-panel p {
    font-size: 14px;
    color: #000000;
    margin: 0 0 10px 0;
}
.svhm-cancel-warning {
    color: #991b1b !important;
    font-weight: 600;
}
.svhm-cancel-panel-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.svhm-cancel-panel-msg {
    font-size: 13px;
    color: #166534;
    margin-top: 8px !important;
    min-height: 18px;
}
.svhm-cancel-success-msg {
    font-size: 14px;
    color: #166534;
    font-weight: 600;
}

/* ----------------------------------------------------------
   Appointment Detail Page
---------------------------------------------------------- */
.svhm-appt-detail-page {
    max-width: 640px;
    color: #000000;
}
.svhm-appt-detail-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.svhm-appt-detail-page-header h2 {
    margin: 0;
    font-size: 22px;
    color: #000000;
}

/* Appointment detail — room select */
.svhm-room-select-detail {
    padding: 6px 10px;
    border: 2px solid #767676;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
    color: #000;
    min-width: 160px;
}
.svhm-room-select-detail:focus { outline: 2px solid #005fcc; }
.svhm-room-save-msg {
    margin-left: 8px;
    font-size: 12px;
    color: #16a34a;
    font-weight: 600;
}

/* Appointment detail — rescheduled-to box */
.svhm-rescheduled-to-box {
    background: #ede9fe;
    border: 2px solid #7c3aed;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 18px 0;
}
.svhm-rescheduled-to-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #5b21b6;
    margin: 0 0 6px;
}
.svhm-rescheduled-to-datetime {
    font-size: 16px;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0 0 8px;
}
.svhm-rescheduled-to-link {
    font-size: 13px;
    color: #7c3aed;
    text-decoration: underline;
}

/* ----------------------------------------------------------
   Appointment detail — Pre-Visit card
---------------------------------------------------------- */
.svhm-pv-card {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    margin: 20px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.svhm-pv-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #f0f9ff;
    border-bottom: 1.5px solid #bae6fd;
    flex-wrap: wrap;
}
.svhm-pv-card-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #0c4a6e;
}
.svhm-pv-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.svhm-pv-badge-complete {
    background: #dcfce7;
    color: #166534;
}
.svhm-pv-badge-pending {
    background: #fef9c3;
    color: #854d0e;
}
.svhm-pv-consent-section {
    padding: 14px 18px;
}
.svhm-pv-consent-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #111;
    margin-bottom: 10px;
}
.svhm-pv-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid #f3f4f6;
    flex-wrap: wrap;
}
.svhm-pv-consent-row:first-of-type { border-top: none; }
.svhm-pv-consent-doc-name {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    min-width: 220px;
}
.svhm-pv-consent-signed {
    font-size: 13px;
    color: #166534;
}
.svhm-pv-consent-unsigned {
    font-size: 13px;
    color: #92400e;
    font-weight: 500;
}

/* ----------------------------------------------------------
   EHR Bridge install step
---------------------------------------------------------- */
.svhm-ehr-install-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 14px 0 12px;
}
.svhm-ehr-install-block {
    background: #f8faff;
    border: 1px solid #d1d9f0;
    border-radius: 6px;
    padding: 14px 16px;
}
.svhm-ehr-install-heading {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #0047AB;
}
.svhm-ehr-install-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: #333;
    line-height: 1.7;
}
.svhm-ehr-install-list code {
    background: #eef1f8;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
    font-family: monospace;
}
.svhm-ehr-install-note {
    font-size: 13px;
    color: #444;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 0 !important;
}

/* ----------------------------------------------------------
   New Appointments Feed widget  [svh_new_appointments_feed]
---------------------------------------------------------- */

/* Container card */
.svhm-new-feed-widget {
    background: #ffffff;
    border: 1px solid #d6e4ff;
    border-left: 4px solid #0047AB;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 71, 171, 0.08);
}

/* Header row — always visible */
.svhm-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #f0f5ff;
    border-bottom: 1px solid #d6e4ff;
}

/* Title group */
.svhm-feed-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #0f2a5e;
    white-space: nowrap;
}

/* Calendar icon in title */
.svhm-feed-icon {
    width: 16px;
    height: 16px;
    stroke: #0047AB;
    flex-shrink: 0;
}

/* Badge: number of new bookings today */
.svhm-feed-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    background: #0047AB;
    color: #ffffff;
    line-height: 1;
    transition: background 0.2s;
}

/* Zero state — muted so it doesn't draw attention */
.svhm-feed-badge-zero {
    background: #aab4c8;
}

/* Pulse animation on new booking arrival — brief, non-disruptive */
@keyframes svhm-badge-pulse {
    0%   { transform: scale(1);    background: #0047AB; }
    25%  { transform: scale(1.25); background: #1a7a4a; }
    60%  { transform: scale(1.1);  background: #1a7a4a; }
    100% { transform: scale(1);    background: #0047AB; }
}
.svhm-feed-badge-pulse {
    animation: svhm-badge-pulse 0.8s ease-out forwards;
}

/* Controls: View Calendar button + toggle */
.svhm-feed-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Compact variant of the primary button for the header */
.svhm-feed-view-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* Collapse toggle button */
.svhm-feed-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid #b0c4e8;
    border-radius: 6px;
    color: #0047AB;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, border-color 0.15s;
}
.svhm-feed-toggle:hover {
    background: #e0eaff;
    border-color: #0047AB;
}
.svhm-feed-toggle svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    transition: transform 0.2s ease;
}
/* Rotate chevron when collapsed */
.svhm-feed-toggle-collapsed svg {
    transform: rotate(180deg);
}

/* Collapsible body */
.svhm-feed-body {
    padding: 12px 16px;
}

/* Individual booking rows */
.svhm-feed-item {
    padding: 10px 0;
    border-bottom: 1px solid #eef2fb;
}
.svhm-feed-item:last-of-type {
    border-bottom: none;
}

.svhm-feed-item-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.svhm-feed-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f2a5e;
}

.svhm-feed-item-when {
    font-size: 12px;
    color: #545673;
    white-space: nowrap;
    flex-shrink: 0;
}

.svhm-feed-item-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.svhm-feed-appt-datetime {
    font-size: 13px;
    color: #334170;
}

.svhm-feed-visit-type {
    font-size: 12px;
    font-weight: 600;
    background: #e8efff;
    color: #0047AB;
    border-radius: 4px;
    padding: 1px 7px;
}

/* Empty state */
.svhm-feed-empty {
    font-size: 13px;
    color: #545673;
    padding: 8px 0 4px;
}

/* Last-updated note */
.svhm-feed-refresh-note {
    margin: 10px 0 0;
    font-size: 11px;
    color: #5c6b8a; /* was #9aa5be — ~2.3:1 fails WCAG 1.4.3; #5c6b8a = ~5.4:1 */
    border-top: 1px solid #eef2fb;
    padding-top: 8px;
}

/* ----------------------------------------------------------
   Accessibility utility
   Hides content visually while keeping it accessible to
   screen readers. Do NOT use display:none or visibility:hidden.
---------------------------------------------------------- */
.svhm-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ----------------------------------------------------------
   Analytics Dashboard  [svh_analytics_dashboard]
---------------------------------------------------------- */

.svhm-analytics-wrap {
    max-width: 1100px;
    position: relative;
    font-family: inherit;
}

/* Header */
.svhm-analytics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.svhm-analytics-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f2a5e;
    margin: 0;
}

/* Export row */
.svhm-export-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.svhm-export-label {
    font-size: 12px;
    font-weight: 600;
    color: #545673;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 2px;
}
.svhm-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
    color: #334170;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1.4;
    white-space: nowrap;
}
.svhm-export-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #0047AB;
    color: #0047AB;
}
.svhm-export-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Period tabs */
.svhm-period-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.svhm-period-tab {
    padding: 7px 18px;
    border: 1px solid #d6e4ff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #334170;
    background: #ffffff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1.4;
}
.svhm-period-tab.active {
    background: #0047AB;
    color: #ffffff;
    border-color: #0047AB;
}
.svhm-period-tab:hover:not(.active) {
    background: #EBF2FF;
    border-color: #0047AB;
}
/* WCAG 2.4.7 Focus Visible — 3:1 minimum against adjacent colors */
.svhm-period-tab:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 2px;
}

/* Header right group (period tabs + exclude-today toggle) */
.svhm-analytics-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Exclude Today toggle */
.svhm-exclude-today-btn {
    padding: 7px 14px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.svhm-exclude-today-btn.active {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fde68a;
}
.svhm-exclude-today-btn:hover:not(.active) {
    background: #f9fafb;
    border-color: #9ca3af;
}
.svhm-exclude-today-btn:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 2px;
}

/* Refresh button */
.svhm-refresh-btn {
    padding: 7px 14px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.svhm-refresh-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}
.svhm-refresh-btn:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 2px;
}

/* KPI Grid */
.svhm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}
.svhm-kpi-card {
    background: #ffffff;
    border: 1px solid #e8efff;
    border-radius: 10px;
    padding: 20px 18px 16px;
    border-top-width: 4px;
    box-shadow: 0 1px 4px rgba(0,71,171,0.06);
}
.svhm-kpi-blue   { border-top-color: #0047AB; }
.svhm-kpi-green  { border-top-color: #10b981; }
.svhm-kpi-amber  { border-top-color: #f59e0b; }
.svhm-kpi-red    { border-top-color: #ef4444; }
.svhm-kpi-purple { border-top-color: #8b5cf6; }
.svhm-kpi-teal   { border-top-color: #0891b2; }

/* Icon above label on revenue KPI cards */
.svhm-kpi-icon {
    font-size: 22px;
    line-height: 1;
    margin-bottom: 6px;
    display: block;
}

.svhm-kpi-settings-btn {
    display: inline-block;
    background: none;
    border: none;
    padding: 0;
    margin: 2px 0 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #545673;
    line-height: 1.4;
    border-radius: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.svhm-kpi-settings-btn:hover { color: #0047AB; }

.svhm-kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #545673;
    margin-bottom: 8px;
}
.svhm-kpi-value {
    font-size: 30px;
    font-weight: 700;
    color: #0f2a5e;
    line-height: 1;
    margin-bottom: 4px;
    margin-top: 4px;
}
.svhm-kpi-sub {
    font-size: 12px;
    color: #545673;
}
.svhm-kpi-sub-recovery {
    color: #059669;
    font-weight: 600;
    margin-top: 2px;
}

/* No-show: prior-period comparison block */
.svhm-kpi-comparison-block {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e8efff;
}
.svhm-kpi-comparison-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #545673;
    margin-bottom: 3px;
}
.svhm-kpi-comparison-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.svhm-kpi-comparison-value {
    font-size: 16px;
    font-weight: 700;
    color: #0f2a5e;
}
.svhm-kpi-delta {
    font-size: 11px;
    font-weight: 600;
}
.svhm-kpi-delta-good    { color: #059669; }
.svhm-kpi-delta-bad     { color: #dc2626; }
.svhm-kpi-delta-neutral { color: #545673; }

/* No-show: target & baseline goal items */
.svhm-kpi-goals-block {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e8efff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.svhm-kpi-goal-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.svhm-kpi-goal-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #545673;
}
.svhm-kpi-goal-value {
    font-size: 15px;
    font-weight: 700;
    color: #0f2a5e;
    line-height: 1;
}
.svhm-kpi-goal-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}
.svhm-kpi-goal-good    { background: #d1fae5; color: #065f46; }
.svhm-kpi-goal-bad     { background: #fee2e2; color: #991b1b; }
.svhm-kpi-goal-neutral { background: #e8efff; color: #0047AB; }

/* Inline settings panel inside KPI card */
.svhm-kpi-settings-panel {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e8efff;
}
.svhm-kpi-settings-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 8px;
}
.svhm-kpi-settings-label {
    font-size: 11px;
    font-weight: 600;
    color: #545673;
}
.svhm-kpi-settings-input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #c5d5f5;
    border-radius: 5px;
    font-size: 13px;
    color: #0f2a5e;
    box-sizing: border-box;
}
.svhm-kpi-settings-input:focus {
    outline: none;
    border-color: #0047AB;
    box-shadow: 0 0 0 2px rgba(0,71,171,0.12);
}
.svhm-kpi-settings-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}
.svhm-kpi-settings-save {
    background: #0047AB;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.svhm-kpi-settings-save:hover { background: #003585; }
.svhm-kpi-settings-save:disabled { opacity: 0.6; cursor: default; }
.svhm-kpi-settings-cancel {
    background: none;
    border: 1px solid #c5d5f5;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 12px;
    color: #545673;
    cursor: pointer;
}
.svhm-kpi-settings-cancel:hover { background: #f0f4ff; }
.svhm-kpi-settings-note {
    font-size: 10px;
    color: #545673;
    margin: 0;
    line-height: 1.4;
}

/* Chart layout */
.svhm-chart-full {
    margin-bottom: 36px;
}
.svhm-chart-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 36px;
}
.svhm-chart-card {
    background: #ffffff;
    border: 1px solid #e8efff;
    border-radius: 10px;
    padding: 22px 22px 18px;
    box-shadow: 0 1px 4px rgba(0,71,171,0.06);
}
.svhm-chart-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f2a5e;
    margin: 0 0 16px;
}
.svhm-chart-canvas-wrap {
    position: relative;
}

/* Loading overlay */
.svhm-analytics-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border-radius: 10px;
}
.svhm-analytics-spinner {
    width: 38px;
    height: 38px;
    border: 4px solid #d6e4ff;
    border-top-color: #0047AB;
    border-radius: 50%;
    animation: svhm-spin 0.75s linear infinite;
}
@keyframes svhm-spin {
    to { transform: rotate(360deg); }
}

/* ----------------------------------------------------------
   Conversion Funnel
---------------------------------------------------------- */
.svhm-funnel-stages {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.svhm-funnel-stage {
    /* Each stage is a bar + meta row */
}
.svhm-funnel-bar-wrap {
    position: relative;
    height: 44px;
    background: #f0f5ff;
    border-radius: 6px;
    overflow: hidden;
}
.svhm-funnel-bar {
    height: 100%;
    background: linear-gradient(90deg, #0047AB 0%, #3b82f6 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 6px;
    position: relative;
}
.svhm-funnel-bar-untracked {
    background: #d6e4ff;
    opacity: 0.6;
}
.svhm-funnel-bar-label {
    position: absolute;
    left: 14px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    pointer-events: none;
}
.svhm-funnel-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 2px 2px;
    font-size: 13px;
    color: #334170;
}
.svhm-funnel-stage-name {
    font-weight: 500;
}
.svhm-funnel-count {
    font-weight: 700;
    color: #0f2a5e;
}
.svhm-funnel-no-data-badge {
    font-size: 11px;
    font-weight: 600;
    background: #f0f5ff;
    color: #545673;
    border: 1px dashed #b0c4e8;
    border-radius: 10px;
    padding: 2px 8px;
}
.svhm-funnel-practice-wide-badge {
    font-size: 11px;
    font-weight: 600;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 2px 8px;
    margin-left: 6px;
    white-space: nowrap;
}
/* Arrow between funnel stages */
.svhm-funnel-arrow {
    text-align: center;
    padding: 2px 0;
    color: #5c6b8a; /* was #aab4c8 — fails WCAG 1.4.3; #5c6b8a = ~5.4:1 */
    font-size: 11px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 12px;
    gap: 8px;
}
.svhm-funnel-arrow::before {
    content: '▼';
    font-size: 10px;
    color: #545673;
}
.svhm-funnel-conv-badge {
    font-size: 11px;
    font-weight: 700;
    background: #f0fdf4;
    color: #10b981;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 2px 8px;
}
.svhm-funnel-arrow-muted::before {
    color: #545673;
}
.svhm-funnel-note {
    font-size: 12px;
    color: #5c6b8a; /* was #9aa5be — fails WCAG 1.4.3 */
    border-top: 1px solid #eef2fb;
    padding-top: 10px;
    margin: 14px 0 0;
}

/* Revenue setup prompt (shown when no vt_avg_value configured) */
.svhm-revenue-setup-prompt {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 4px solid #0284c7;
    border-radius: 10px;
    padding: 16px 18px;
    margin-top: -4px;
    margin-bottom: 36px;
    font-size: 13px;
    color: #0c4a6e;
    line-height: 1.5;
}
.svhm-revenue-setup-icon {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 1px;
}
.svhm-revenue-setup-body a {
    color: #0047AB;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.svhm-revenue-setup-body a:hover { color: #003A8C; }

/* Chart empty state (revenue charts before avg values are set) */
.svhm-chart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 20px;
    text-align: center;
    color: #5c6b8a;
    font-size: 13px;
    line-height: 1.5;
    min-height: 120px;
}
.svhm-chart-empty-state span { font-size: 28px; }
.svhm-chart-empty-state p { margin: 0; }
.svhm-chart-empty-state a {
    color: #0047AB;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.svhm-chart-empty-state a:hover { color: #003A8C; }

/* ----------------------------------------------------------
   Time & Cost Savings Card
---------------------------------------------------------- */
.svhm-savings-card {
    background: linear-gradient(135deg, #f0f5ff 0%, #ffffff 60%);
    border: 1px solid #d6e4ff;
    border-radius: 12px;
    padding: 28px 28px 22px;
    box-shadow: 0 2px 8px rgba(0,71,171,0.07);
}
.svhm-savings-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid #e0eaff;
}
.svhm-savings-headline {
    font-size: 18px;
    font-weight: 700;
    color: #0f2a5e;
    margin: 0 0 6px;
}
.svhm-savings-tagline {
    font-size: 13px;
    color: #545673;
    margin: 0;
}
.svhm-savings-top-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    flex-shrink: 0;
}
.svhm-savings-totals {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-shrink: 0;
}
.svhm-savings-divider {
    width: 1px;
    height: 52px;
    background: #d6e4ff;
}
.svhm-savings-total-item {
    text-align: center;
}
.svhm-savings-big-num {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}
.svhm-savings-unit {
    font-weight: 600;
}
.svhm-savings-hours {
    color: #0047AB;
}
.svhm-savings-cost {
    color: #10b981;
}
.svhm-savings-big-label {
    font-size: 12px;
    color: #545673;
    font-weight: 500;
}

/* 3-column savings breakdown */
.svhm-savings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 18px;
}
.svhm-savings-stat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e8efff;
    border-radius: 8px;
    padding: 16px;
}
.svhm-savings-stat-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}
.svhm-savings-stat-label {
    font-size: 12px;
    font-weight: 700;
    color: #334170;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.svhm-savings-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #0047AB;
    line-height: 1;
    margin-bottom: 3px;
}
.svhm-savings-stat-note {
    font-size: 13px;
    color: #111111;
    font-weight: 500;
}
.svhm-savings-note {
    font-size: 13px;
    color: #111111;
    font-weight: 500;
    font-style: normal;
    margin: 0;
}

/* ----------------------------------------------------------
   Practice ROI Summary Card
----------------------------------------------------------- */
.svhm-roi-card {
    background: linear-gradient(135deg, #f0f5ff 0%, #ffffff 70%);
    border: 2px solid #0047AB;
    border-radius: 12px;
    padding: 28px 28px 22px;
    box-shadow: 0 2px 10px rgba(0,71,171,0.10);
}
.svhm-roi-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.svhm-roi-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f2a5e;
    margin: 0;
}
.svhm-roi-period-badge {
    font-size: 12px;
    font-weight: 700;
    color: #0047AB;
    background: #e8f0fe;
    border: 1px solid #c7d4f0;
    border-radius: 999px;
    padding: 3px 10px;
    white-space: nowrap;
}
.svhm-roi-body-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 22px;
}
@media (max-width: 700px) {
    .svhm-roi-body-grid { grid-template-columns: 1fr; gap: 18px; }
}
.svhm-roi-panel {
    background: #fff;
    border: 1px solid #d6e4ff;
    border-radius: 10px;
    padding: 18px 20px;
}
.svhm-roi-panel-head {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0047AB;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8efff;
}
.svhm-roi-table {
    width: 100%;
    border-collapse: collapse;
}
.svhm-roi-table tbody tr + tr td {
    padding-top: 8px;
}
.svhm-roi-row-label {
    font-size: 13px;
    color: #334170;
    padding-right: 12px;
    line-height: 1.35;
}
.svhm-roi-row-sublabel {
    display: block;
    font-size: 11px;
    color: #5c6b8a;
    font-weight: 400;
    margin-top: 1px;
}
.svhm-roi-link {
    color: #0047AB;
    text-decoration: underline;
}
.svhm-roi-link:hover { color: #003A8C; }
.svhm-roi-row-val {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    text-align: right;
    white-space: nowrap;
}
.svhm-roi-table tfoot {
    border-top: 1px solid #d6e4ff;
}
.svhm-roi-total-row td {
    padding-top: 10px;
}
.svhm-roi-total-row .svhm-roi-row-label {
    font-weight: 700;
    color: #0f2a5e;
}
.svhm-roi-total-val {
    font-size: 18px;
    color: #0047AB;
}
/* Investment panel */
.svhm-roi-invest-field {
    margin-bottom: 14px;
}
.svhm-roi-invest-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334170;
    margin-bottom: 6px;
}
.svhm-roi-invest-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.svhm-roi-invest-prefix,
.svhm-roi-invest-suffix {
    font-size: 14px;
    font-weight: 600;
    color: #334170;
}
.svhm-roi-invest-input {
    width: 90px;
    padding: 8px 10px;
    font-size: 15px;
    font-weight: 700;
    color: #000;
    border: 1px solid #4a4a4a;
    border-radius: 7px;
    background: #fafafa;
    -moz-appearance: textfield;
}
.svhm-roi-invest-input::-webkit-inner-spin-button,
.svhm-roi-invest-input::-webkit-outer-spin-button { opacity: 1; }
.svhm-roi-invest-input:hover { border-color: #0047AB; }
.svhm-roi-invest-input:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 1px;
    border-color: #0047AB;
}
.svhm-roi-invest-saved {
    font-size: 11px;
    color: #166534;
    font-weight: 600;
}
.svhm-roi-invest-hint {
    font-size: 12px;
    color: #5c6b8a;
    margin: 5px 0 0;
}
.svhm-roi-invest-period {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    background: #f0f4ff;
    border: 1px solid #c7d4f0;
    border-radius: 7px;
    padding: 10px 12px;
}
.svhm-roi-invest-period-label {
    font-size: 13px;
    color: #334170;
    font-weight: 600;
}
/* ROI Result bar */
.svhm-roi-result {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    border-radius: 10px;
    padding: 18px 24px;
    margin-bottom: 4px;
    text-align: center;
}
.svhm-roi-result--positive {
    background: #f0fdf4;
    border: 2px solid #16a34a;
}
.svhm-roi-result--negative {
    background: #fffbeb;
    border: 2px solid #d97706;
}
.svhm-roi-result-pct {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: #000;
}
.svhm-roi-result--positive .svhm-roi-result-pct { color: #15803d; }
.svhm-roi-result--negative .svhm-roi-result-pct { color: #92400e; }
.svhm-roi-result-details {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
    font-weight: 600;
    color: #334170;
}
.svhm-roi-result-sep {
    color: #94a3b8;
    font-size: 16px;
}
.svhm-roi-no-cost {
    font-size: 13px;
    color: #0047AB;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 4px;
    text-align: center;
    font-weight: 600;
}

/* ----------------------------------------------------------
   Responsive
---------------------------------------------------------- */
@media (max-width: 768px) {
    .svhm-chart-grid-2 { grid-template-columns: 1fr; }
    .svhm-savings-grid { grid-template-columns: 1fr; }
    .svhm-savings-totals { gap: 16px; }
    .svhm-savings-big-num { font-size: 28px; }
}
@media (max-width: 640px) {
    .svhm-wizard-step { flex-direction: column; }
    .svhm-appointment-card { flex-direction: column; align-items: flex-start; }
    .svhm-dashboard-filters { flex-direction: column; }
    .svhm-cal-nav { flex-direction: column; }
    .svhm-cal-day { height: 52px; padding: 4px; }
    .svhm-cal-badge { display: none; }
    .svhm-cal-modal { padding: 20px 16px; }
    .svhm-appt-detail-staff-actions { flex-direction: column; }
    .svhm-ehr-install-steps { grid-template-columns: 1fr; }
    .svhm-feed-header { flex-wrap: wrap; gap: 8px; }
    .svhm-feed-item-row { flex-direction: column; gap: 2px; }
    .svhm-feed-item-when { font-size: 11px; }
    .svhm-analytics-header { flex-direction: column; align-items: flex-start; }
    .svhm-analytics-header-right { flex-direction: column; align-items: flex-start; }
    .svhm-savings-top { flex-direction: column; }
    .svhm-kpi-value { font-size: 24px; }
}

/* ==========================================================================
   Analytics Summary Widget  [svh_analytics_summary]
   Compact snapshot designed to sit alongside New Bookings Today feed
   ========================================================================== */

.svhm-analytics-summary-widget {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    font-family: inherit;
}

/* Header */
.svhm-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 12px;
    border-bottom: 1px solid #f1f5f9;
    gap: 8px;
}

.svhm-summary-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #0f2a5e;
    line-height: 1.2;
}

.svhm-summary-icon {
    width: 16px;
    height: 16px;
    color: #0047AB;
    flex-shrink: 0;
}

.svhm-summary-period {
    font-size: 11px;
    font-weight: 500;
    color: #5c6b8a;
    white-space: nowrap;
    background: #f0f5ff;
    border-radius: 20px;
    padding: 2px 8px;
}

/* 2×2 Stats Grid */
.svhm-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.svhm-summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 12px;
    text-align: center;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.svhm-summary-stat:nth-child(2),
.svhm-summary-stat:nth-child(4) {
    border-right: none;
}

.svhm-summary-stat:nth-child(3),
.svhm-summary-stat:nth-child(4) {
    border-bottom: none;
}

.svhm-summary-value {
    font-size: 26px;
    font-weight: 700;
    color: #0047AB;
    line-height: 1.1;
    margin-bottom: 4px;
}

/* Sentiment colors for rate values */
.svhm-summary-positive { color: #059669; }
.svhm-summary-neutral  { color: #d97706; }
.svhm-summary-negative { color: #dc2626; }

.svhm-summary-label {
    font-size: 11px;
    font-weight: 500;
    color: #5c6b8a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

/* Empty state */
.svhm-summary-empty {
    margin: 0;
    padding: 12px 18px;
    font-size: 12px;
    color: #5c6b8a;
    text-align: center;
    font-style: italic;
    border-bottom: 1px solid #f1f5f9;
}

/* CTA Footer */
.svhm-summary-footer {
    padding: 14px 18px;
    background: #f8faff;
    border-top: 1px solid #e2e8f0;
}

.svhm-btn-summary-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 16px;
    background: #0047AB;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 6px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    line-height: 1;
}

.svhm-btn-summary-cta svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.svhm-btn-summary-cta:hover {
    background: #003585;
    box-shadow: 0 2px 8px rgba(0, 71, 171, 0.3);
}

.svhm-btn-summary-cta:hover svg {
    transform: translateX(3px);
}

.svhm-btn-summary-cta:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 2px;
    background: #003585;
}

/* Responsive: on very narrow columns collapse to 1 stat per row */
@media (max-width: 320px) {
    .svhm-summary-grid { grid-template-columns: 1fr; }
    .svhm-summary-stat { border-right: none; }
}

/* ----------------------------------------------------------
   Shared form field primitives (used by staff lookup + others)
   Scoped under .svhm-staff-schedule-wrap for specificity over theme styles.
---------------------------------------------------------- */
.svhm-field-label,
.svhm-staff-schedule-wrap .svhm-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    margin: 0 0 5px 0;
}
.svhm-field-input,
.svhm-staff-schedule-wrap input[type="text"],
.svhm-staff-schedule-wrap input[type="email"],
.svhm-staff-schedule-wrap input[type="tel"],
.svhm-staff-schedule-wrap input[type="date"],
.svhm-staff-schedule-wrap select {
    display: block;
    width: 100%;
    padding: 10px 13px;
    font-size: 14px;
    font-family: inherit;
    color: #000000;
    background: #ffffff;
    border: 1.5px solid #94a3b8;
    border-radius: 7px;
    box-sizing: border-box;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    line-height: 1.45;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
.svhm-field-input:focus,
.svhm-staff-schedule-wrap input[type="text"]:focus,
.svhm-staff-schedule-wrap input[type="email"]:focus,
.svhm-staff-schedule-wrap input[type="tel"]:focus,
.svhm-staff-schedule-wrap input[type="date"]:focus,
.svhm-staff-schedule-wrap select:focus {
    outline: none;
    border-color: #0047AB;
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.15);
}
.svhm-field-input::placeholder,
.svhm-staff-schedule-wrap input::placeholder {
    color: #545673;
}

/* Small button variant */
.svhm-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Muted text */
.svhm-text-muted {
    color: #545673;
    font-size: 13px;
}

/* ----------------------------------------------------------
   Staff Scheduling — shared wrapper
---------------------------------------------------------- */
.svhm-staff-schedule-wrap {
    max-width: 820px;
    color: #000000;
}

/* ----------------------------------------------------------
   Staff Scheduling — New / Existing Patient choice
---------------------------------------------------------- */
.svhm-staff-choice {
    margin-bottom: 32px;
}
.svhm-staff-choice-header {
    margin-bottom: 24px;
}
.svhm-staff-choice-title {
    font-size: 22px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 6px 0;
}
.svhm-staff-choice-subtitle {
    font-size: 15px;
    color: #333333;
    margin: 0;
}
.svhm-staff-choice-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.svhm-staff-choice-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    padding: 28px 24px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.svhm-staff-choice-card:hover:not([disabled]) {
    border-color: #0047AB;
    box-shadow: 0 4px 16px rgba(0, 71, 171, 0.12);
    background: #f8fbff;
}
.svhm-staff-choice-card:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 2px;
}
.svhm-staff-choice-card[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}
.svhm-staff-choice-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #EBF2FF;
    color: #0047AB;
    flex-shrink: 0;
}
.svhm-staff-choice-card-icon svg {
    width: 26px;
    height: 26px;
    display: block;
}
.svhm-staff-choice-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    display: block;
}
.svhm-staff-choice-card-desc {
    font-size: 13px;
    color: #555555;
    line-height: 1.5;
    display: block;
}
@media (max-width: 560px) {
    .svhm-staff-choice-cards {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------------------
   Staff Scheduling — Patient Lookup section
---------------------------------------------------------- */
.svhm-staff-lookup-wrap {
    color: #000000;
}

/* Back button */
.svhm-staff-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    color: #0047AB;
    cursor: pointer;
    margin-bottom: 20px;
    font-family: inherit;
    transition: color 0.15s ease;
}
.svhm-staff-back-btn:hover {
    color: #003A8C;
}
.svhm-staff-back-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Header */
.svhm-staff-lookup-header {
    margin-bottom: 24px;
}
.svhm-staff-lookup-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 6px 0;
}
.svhm-staff-lookup-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #0047AB;
}
.svhm-staff-lookup-subtitle {
    font-size: 14px;
    color: #333333;
    margin: 0;
}

/* Search form fields */
.svhm-staff-lookup-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.svhm-staff-field-group {
    display: flex;
    flex-direction: column;
}

/* Submit button */
.svhm-staff-lookup-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.svhm-staff-lookup-submit svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Results area */
.svhm-staff-lookup-results {
    margin-top: 28px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}
.svhm-staff-lookup-notice {
    font-size: 14px;
    color: #333333;
    margin: 0;
}
.svhm-staff-lookup-notice--warning {
    color: #b91c1c;
}
.svhm-staff-lookup-new-link {
    color: #0047AB;
    font-weight: 600;
    text-decoration: underline;
}
.svhm-staff-lookup-count {
    font-size: 14px;
    color: #333333;
    margin: 0 0 14px 0;
}

/* Results table */
.svhm-staff-lookup-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.svhm-staff-lookup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #000000;
}
.svhm-staff-lookup-table thead {
    background: #f8fafc;
}
.svhm-staff-lookup-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #555555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}
.svhm-staff-lookup-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #000000;
}
.svhm-staff-lookup-table tbody tr:last-child td {
    border-bottom: none;
}
.svhm-staff-lookup-table tbody tr:hover td {
    background: #f8fbff;
}

/* Schedule button in table */
.svhm-btn-schedule-patient {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0047AB;
    color: #ffffff !important;
    border-color: #0047AB;
    white-space: nowrap;
    text-decoration: none !important;
}
.svhm-btn-schedule-patient:hover {
    background: #003A8C;
    border-color: #003A8C;
}
.svhm-btn-schedule-patient svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────
   Records Export  [svh_records_export]
───────────────────────────────────────────────────────────────── */
.svhm-records-export-wrap {
    max-width: 900px;
}
.svhm-records-export-subtitle {
    margin: 2px 0 0;
    font-size: 14px;
    color: #545673;
}
.svhm-records-export-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #f8fbff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.svhm-records-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}
.svhm-records-filter-group--wide {
    min-width: 0;
    flex: 1 1 100%;
}
.svhm-records-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #545673;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.svhm-records-filter-select {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    background: #ffffff;
    border: 1.5px solid #94a3b8;
    border-radius: 7px;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.svhm-records-filter-select:focus {
    outline: none;
    border-color: #0047AB;
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.15);
}
.svhm-records-export-count {
    font-size: 13px;
    color: #545673;
    font-weight: 500;
    margin-left: 4px;
}
.svhm-records-export-notice {
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}
.svhm-records-export-notice--error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.svhm-records-export-notice--info {
    background: #e8efff;
    color: #0047AB;
    border: 1px solid #bfcfff;
}
@media (max-width: 640px) {
    .svhm-records-export-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .svhm-records-filter-group {
        min-width: 0;
    }
}

/* Responsive table: stack on mobile */
@media (max-width: 600px) {
    .svhm-staff-lookup-table thead {
        display: none;
    }
    .svhm-staff-lookup-table,
    .svhm-staff-lookup-table tbody,
    .svhm-staff-lookup-table tr,
    .svhm-staff-lookup-table td {
        display: block;
        width: 100%;
    }
    .svhm-staff-lookup-table tr {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 12px;
        overflow: hidden;
    }
    .svhm-staff-lookup-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 14px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 13px;
    }
    .svhm-staff-lookup-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #555555;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        flex-shrink: 0;
        margin-right: 12px;
    }
    .svhm-staff-lookup-table-wrap {
        border: none;
    }
}

/* ─────────────────────────────────────────────────────────────────
   EHR Export  [svhm_ehr_export]
───────────────────────────────────────────────────────────────── */
.svhm-ehr-export-wrap {
    max-width: 900px;
}
.svhm-ehr-export-subtitle {
    margin: 2px 0 0;
    font-size: 14px;
    color: #111111;
}
.svhm-ehr-phi-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #FFF8E6;
    border: 1px solid #e6a817;
    border-left: 4px solid #e6a817;
    border-radius: 7px;
    padding: 12px 16px;
    font-size: 13px;
    color: #111111;
    margin: 16px 0 20px;
    line-height: 1.5;
}
.svhm-ehr-phi-notice-icon {
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1.4;
    color: #b07d10;
}
.svhm-ehr-date-input {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d9e6;
    border-radius: 7px;
    font-size: 14px;
    color: #111111;
    background: #ffffff;
    min-height: 44px;
    box-sizing: border-box;
}
.svhm-ehr-date-input:focus {
    outline: none;
    border-color: #0047AB;
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.15);
}
.svhm-ehr-date-input:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 2px;
}
.svhm-ehr-count {
    font-size: 13px;
    font-weight: 500;
    color: #111111;
    margin-left: 4px;
}
@media (max-width: 640px) {
    .svhm-ehr-export-wrap .svhm-records-export-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .svhm-ehr-export-wrap .svhm-records-filter-group {
        min-width: 0;
    }
}

/* ─────────────────────────────────────────────────────────────────
   EHR Template Manager
───────────────────────────────────────────────────────────────── */
.svhm-ehr-tmpl-manager {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #e2e8f0;
}
.svhm-ehr-tmpl-manager-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.svhm-ehr-tmpl-manager-title {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
    margin: 0;
}
.svhm-ehr-tmpl-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #111111;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 14px 0 6px;
}
.svhm-ehr-tmpl-list {
    list-style: none;
    margin: 0 0 4px;
    padding: 0;
}
.svhm-ehr-tmpl-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 7px;
    border: 1px solid #e2e8f0;
    margin-bottom: 6px;
    background: #ffffff;
}
.svhm-ehr-tmpl-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #111111;
}
.svhm-ehr-tmpl-badge {
    font-size: 11px;
    font-weight: 600;
    color: #111111;
    background: #f1f5f9;
    border-radius: 4px;
    padding: 2px 7px;
    white-space: nowrap;
}
.svhm-ehr-tmpl-empty {
    font-size: 13px;
    color: #111111;
    padding: 6px 0;
}
.svhm-ehr-tmpl-del {
    padding: 7px 12px;
    border: 1px solid #fca5a5;
    border-radius: 7px;
    background: #ffffff;
    color: #991b1b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    min-height: 44px;
    line-height: 1.4;
    white-space: nowrap;
}
.svhm-ehr-tmpl-del:hover {
    background: #fee2e2;
}
.svhm-ehr-tmpl-del:focus-visible {
    outline: 3px solid #991b1b;
    outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────────
   EHR Template Dialog
───────────────────────────────────────────────────────────────── */
.svhm-ehr-tmpl-dialog {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    padding: 0;
    width: min(560px, calc(100vw - 32px));
    max-height: 90vh;
    inset: 0;
    margin: auto;
    overflow: hidden;
}
.svhm-ehr-tmpl-dialog[open] {
    display: flex;
    flex-direction: column;
}
.svhm-ehr-tmpl-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
}
.svhm-ehr-tmpl-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.svhm-ehr-tmpl-dialog-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: #111111;
    margin: 0;
}
.svhm-ehr-dialog-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #111111;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.svhm-ehr-dialog-close:hover {
    background: #f1f5f9;
}
.svhm-ehr-dialog-close:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 2px;
}
.svhm-ehr-tmpl-dialog-body {
    padding: 18px 20px;
    overflow-y: auto;
    flex: 1;
}
.svhm-ehr-tmpl-form-row {
    margin-bottom: 14px;
}
.svhm-ehr-tmpl-form-row--inline {
    display: flex;
    gap: 12px;
}
.svhm-ehr-tmpl-form-row--inline > div {
    flex: 1;
    min-width: 0;
}
.svhm-ehr-tmpl-fields-label-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 6px 0 6px;
}
.svhm-ehr-tmpl-fields-hint {
    font-size: 11px;
    font-weight: 500;
    color: #111111;
    text-transform: none;
    letter-spacing: 0;
}
.svhm-ehr-tmpl-field-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.svhm-ehr-tmpl-field-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    min-height: 40px;
}
.svhm-ehr-tmpl-field-row:last-child {
    border-bottom: none;
}
.svhm-ehr-tmpl-field-row--unchecked {
    background: #f8fafc;
    opacity: 0.65;
}
.svhm-ehr-tmpl-move-btn {
    background: none;
    border: 1px solid #d1d9e6;
    border-radius: 4px;
    color: #111111;
    font-size: 12px;
    padding: 2px 5px;
    cursor: pointer;
    min-height: 26px;
    min-width: 26px;
    line-height: 1;
    flex-shrink: 0;
}
.svhm-ehr-tmpl-move-btn:hover:not(:disabled) {
    background: #EBF2FF;
    border-color: #0047AB;
}
.svhm-ehr-tmpl-move-btn:disabled {
    opacity: 0.3;
    cursor: default;
}
.svhm-ehr-tmpl-move-btn:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 2px;
}
.svhm-ehr-tmpl-field-check-wrap {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.svhm-ehr-tmpl-field-check {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #0047AB;
    flex-shrink: 0;
}
.svhm-ehr-tmpl-field-label {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #d1d9e6;
    border-radius: 5px;
    font-size: 13px;
    color: #111111;
    min-height: 32px;
    box-sizing: border-box;
    min-width: 0;
}
.svhm-ehr-tmpl-field-label:focus {
    outline: none;
    border-color: #0047AB;
    box-shadow: 0 0 0 2px rgba(0, 71, 171, 0.15);
}
.svhm-ehr-tmpl-field-label:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 2px;
}
.svhm-ehr-tmpl-field-source {
    font-size: 11px;
    color: #111111;
    min-width: 90px;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}
.svhm-ehr-tmpl-dialog-footer {
    padding: 14px 20px 18px;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.svhm-ehr-tmpl-save-error {
    font-size: 13px;
    color: #991b1b;
    font-weight: 500;
    flex: 1;
    min-width: 0;
}
.svhm-ehr-tmpl-dialog-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.svhm-ehr-tmpl-cancel {
    padding: 8px 16px;
    border: 1px solid #d1d9e6;
    border-radius: 7px;
    background: #ffffff;
    color: #111111;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    min-height: 44px;
    line-height: 1.4;
}
.svhm-ehr-tmpl-cancel:hover {
    background: #f1f5f9;
}
.svhm-ehr-tmpl-cancel:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 2px;
}
@media (max-width: 600px) {
    .svhm-ehr-tmpl-dialog {
        max-height: 100dvh;
        border-radius: 0;
        margin: 0;
        inset: 0;
    }
    .svhm-ehr-tmpl-form-row--inline {
        flex-direction: column;
    }
    .svhm-ehr-tmpl-field-source {
        display: none;
    }
    .svhm-ehr-tmpl-dialog-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .svhm-ehr-tmpl-dialog-actions {
        justify-content: flex-end;
    }
}

/* ─────────────────────────────────────────────────────────────────
   EHR Export Card  [svhm_ehr_export_card]
───────────────────────────────────────────────────────────────── */
.svhm-ehr-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    max-width: 360px;
    box-sizing: border-box;
}
.svhm-ehr-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
}
.svhm-ehr-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
    margin: 0;
}
.svhm-ehr-card-date {
    font-size: 12px;
    font-weight: 500;
    color: #111111;
    white-space: nowrap;
}
.svhm-ehr-card-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 10px;
}
.svhm-ehr-card-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.svhm-ehr-card-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #0047AB;
    line-height: 1;
}
.svhm-ehr-card-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #111111;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.svhm-ehr-card-breakdown {
    font-size: 13px;
    color: #111111;
    margin-bottom: 16px;
    display: flex;
    gap: 6px;
    align-items: center;
}
.svhm-ehr-card-breakdown-sep {
    color: #111111;
}
.svhm-ehr-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.svhm-ehr-card-btn {
    padding: 7px 12px;
    border: 1px solid #d6e4ff;
    border-radius: 7px;
    background: #ffffff;
    color: #111111;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    min-height: 44px;
    line-height: 1.4;
    white-space: nowrap;
}
.svhm-ehr-card-btn:hover:not(:disabled) {
    background: #EBF2FF;
    border-color: #0047AB;
    color: #0047AB;
}
.svhm-ehr-card-btn:disabled {
    opacity: 0.6;
    cursor: default;
}
.svhm-ehr-card-btn:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 2px;
}
.svhm-ehr-card-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: #0047AB;
    text-decoration: none;
}
.svhm-ehr-card-link:hover {
    text-decoration: underline;
}
.svhm-ehr-card-link:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 2px;
    border-radius: 2px;
}
.svhm-ehr-card-notice {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #991b1b;
}

/* ─────────────────────────────────────────────────────────────────
   Setup Wizard — EHR Integration Step
───────────────────────────────────────────────────────────────── */
.svhm-step-optional-label {
    font-size: 0.75em;
    font-weight: 400;
    color: #111111;
}
.svhm-ehr-integration-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}
.svhm-ehr-integration-option {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px;
}
.svhm-ehr-integration-option-type {
    font-size: 11px;
    font-weight: 700;
    color: #111111;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 4px;
}
.svhm-ehr-integration-option-name {
    font-size: 16px;
    font-weight: 700;
    color: #0047AB;
    margin: 0 0 12px;
}
