/* Hub Layout */
.hub-modal-content { background: #f8f9fa; }
.communication-hub-container { display: flex; height: calc(100vh - 2px); background: #fff; overflow: hidden; }
.hub-main-panel { flex: 1; display: flex; flex-direction: column; height: 100%; overflow: hidden; background: #fff; }

.hub-content-area {
    height: 100%;
}

/* Zone A: Header */
.hub-header { 
    padding: 1rem 2rem; 
    border-bottom: 1px solid #f1f3f5; 
    position: sticky; 
    top: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); 
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.02);
    flex-shrink: 0;
}
.hub-header.active-call { 
    background: linear-gradient(to right, #ffffff, #f0f7ff); 
    border-bottom: 2px solid #0d6efd;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

#commHubModal .comm-hub-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}

#commHubModal .comm-hub-header-identity,
#commHubModal .comm-hub-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

#commHubModal .comm-hub-header-identity {
    flex: 1 1 auto;
}

#commHubModal .comm-hub-header-actions {
    flex: 0 0 auto;
}

#commHubModal .comm-hub-context-label {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1;
    margin: 0 0 5px;
    padding: 0;
    text-transform: uppercase;
}

#commHubModal .comm-hub-context-label i {
    color: #0d6efd;
}

#commHubModal .comm-hub-queue-bridge {
    min-height: 40px;
    border-radius: 8px;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#commHubModal .comm-hub-phone-queue-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    height: 1.45rem;
    margin-left: 0.2rem;
    padding: 0 0.38rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
}

#commHubModal .comm-hub-queue-bridge.is-live {
    color: #14532d;
    background: #dcfce7;
    border-color: #86efac;
}

#commHubModal .comm-hub-queue-bridge.is-in-progress,
#commHubModal .comm-hub-queue-bridge.is-claimed {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #93c5fd;
}

#commHubModal .comm-hub-queue-bridge.is-review {
    color: #92400e;
    background: #fef3c7;
    border-color: #fcd34d;
}

/* Patient Context */
.patient-context {
    min-width: 320px;
    min-height: 64px; /* Ensures consistent height before/after load */
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.patient-context h3.patient-header-name {
    color: #111827;
    letter-spacing: -0.025em;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    font-size: 1.5rem;
    font-weight: 800;
    min-height: 1.2em; /* Prevents collapse */
}

#current-call-patient-details {
    min-height: 28px; /* Height of the badges */
    flex-wrap: wrap;
}
.patient-badge-sm {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    padding: 4px 12px !important;
    border-radius: 50px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.patient-badge-sm:hover {
    background-color: #f1f3f5 !important;
    border-color: #d1d5db !important;
}
.patient-badge-sm i {
    color: #0d6efd;
    font-size: 0.75rem;
}
.patient-badge-sm span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4b5563;
}

#commHubModal .comm-hub-left-rail {
    background: #f8fafc !important;
    flex: 0 0 clamp(360px, 22vw, 410px);
    width: clamp(360px, 22vw, 410px);
    min-width: 0;
    scrollbar-gutter: stable;
}

#commHubModal .comm-hub-activity-layout {
    display: flex;
    min-height: 0;
    width: 100%;
}

#commHubModal .comm-hub-main-feed {
    flex: 1 1 auto;
    min-width: 0;
    padding: 1rem 1.25rem;
}

#commHubModal .comm-hub-main-content-frame {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 1320px;
    min-height: 0;
    overflow: hidden;
}

#commHubModal .comm-hub-side-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
    padding: 0.85rem;
}

#commHubModal .comm-hub-side-card-title {
    color: #111827;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

#commHubModal .comm-hub-status-list {
    display: grid;
    gap: 0.5rem;
}

#commHubModal .comm-hub-status-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    font-size: 0.78rem;
}

#commHubModal .comm-hub-status-row span {
    color: #6b7280;
    font-weight: 700;
}

#commHubModal .comm-hub-status-row strong {
    color: #111827;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#commHubModal .comm-hub-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

#commHubModal .comm-hub-metric-grid .hub-metric-card {
    min-width: 0;
    padding: 0.62rem 0.7rem;
    border-radius: 8px;
}

#commHubModal .comm-hub-metric-grid .hub-metric-label {
    white-space: normal;
    line-height: 1.15;
}

#commHubModal .comm-hub-metric-wide {
    grid-column: 1 / -1;
}

#commHubModal .comm-hub-patient-queue-card {
    border-color: #cfe0f5;
    background: #f5f9ff;
    padding: 0.75rem;
}

#commHubModal .comm-hub-patient-queue-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

#commHubModal .comm-hub-patient-queue-copy {
    min-width: 0;
}

#commHubModal .comm-hub-patient-queue-heading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.2rem;
}

#commHubModal .comm-hub-patient-queue-heading .badge {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#commHubModal #comm-hub-open-patient-queue-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    min-height: 34px;
    padding: 0.35rem 0.6rem;
}

#commHubModal .comm-hub-activity-header {
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

#commHubModal .comm-hub-activity-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

#commHubModal.comm-hub-no-phone-calls .comm-hub-calling-status-row,
#commHubModal.comm-hub-no-phone-calls [data-activity-summary="calls"],
#commHubModal.comm-hub-no-phone-calls [data-activity-summary="missed"],
#commHubModal.comm-hub-no-phone-calls [data-activity-filter="phone_calls"],
#commHubModal.comm-hub-no-phone-calls [data-activity-filter="calls"],
#commHubModal.comm-hub-no-phone-calls .comm-hub-summary-section--phone,
#commHubModal.comm-hub-no-phone-calls .comm-hub-phone-copy {
    display: none !important;
}

#commHubModal.comm-hub-no-phone-calls .comm-hub-summary-section--phone + .comm-hub-summary-section {
    border-top: 0;
    padding-top: 0;
}

#commHubModal .comm-hub-range-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    padding: 0.22rem;
    background: #eef2f7;
    border: 1px solid #cfd8e6;
    border-radius: 10px;
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.04);
}

#commHubModal .comm-hub-range-switch .btn,
#commHubModal .comm-hub-density-switch .btn {
    min-height: 32px;
    border-color: transparent;
    border-radius: 8px;
    color: #475569;
    background: transparent;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.15;
    box-shadow: none;
}

#commHubModal .comm-hub-range-switch .btn.active,
#commHubModal .comm-hub-density-switch .btn.active {
    color: #12325f;
    background: #fff;
    border-color: #8fb6ed;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

#commHubModal .comm-hub-activity-toolbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    flex: 0 0 auto;
    margin-bottom: 0.8rem;
    padding: 0.55rem 0;
    overflow: visible;
    background: #fff;
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
}

#commHubModal .comm-hub-activity-search {
    position: relative;
    flex: 1 1 220px;
    min-width: 190px;
}

#commHubModal .comm-hub-activity-search i {
    position: absolute;
    left: 0.72rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.75rem;
    pointer-events: none;
}

#commHubModal .comm-hub-activity-search .form-control {
    height: 34px;
    padding-left: 2rem;
    border-color: #dbe3ef;
    border-radius: 8px;
    font-size: 0.82rem;
    box-shadow: none;
}

#commHubModal .comm-hub-filter-strip {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1 1 420px;
    flex-wrap: wrap;
    min-width: 0;
    padding: 0.2rem 0;
    overflow: visible;
}

#commHubModal .comm-hub-filter-strip .btn {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0.25rem 0.62rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #475569;
    background: transparent;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

#commHubModal .comm-hub-filter-strip .btn:hover,
#commHubModal .comm-hub-filter-strip .btn:focus-visible {
    color: #0f172a;
    background: #f4f8ff;
    border-color: #cbdaf1;
}

#commHubModal .comm-hub-filter-strip .btn.active {
    color: #0b4a9e;
    background: #dcecff;
    border-color: #74a9ef;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.16), 0 1px 1px rgba(15, 23, 42, 0.04);
}

#commHubModal .comm-hub-filter-strip .btn.active:hover,
#commHubModal .comm-hub-filter-strip .btn.active:focus-visible {
    color: #083f88;
    background: #d5e8ff;
    border-color: #5e9be7;
}

#commHubModal .comm-hub-attention-filter {
    min-height: 30px;
    padding: 0.25rem 0.62rem;
    border-color: transparent;
    border-radius: 999px;
    color: #334155;
    background: transparent;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: none;
}

#commHubModal .comm-hub-attention-filter:hover,
#commHubModal .comm-hub-attention-filter:focus-visible {
    color: #1f2937;
    background: #f8fafc;
    border-color: #c4cedb;
}

#commHubModal .comm-hub-attention-filter.has-review {
    color: #854d0e;
    background: #fffbeb;
    border-color: #f3d391;
}

#commHubModal .comm-hub-attention-filter.active {
    color: #854d0e;
    background: #fff7ed;
    border-color: #fdba74;
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.16), 0 1px 1px rgba(15, 23, 42, 0.04);
}

#commHubModal .comm-hub-attention-filter.is-empty,
#commHubModal .comm-hub-attention-filter:disabled {
    color: #94a3b8;
    background: #f8fafc;
    border-color: #e2e8f0;
    opacity: 1;
    cursor: default;
}

#commHubModal .comm-hub-attention-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    margin-left: 0.35rem;
    padding: 0 0.32rem;
    border-radius: 999px;
    color: #854d0e;
    background: #ffedaa;
    font-size: 0.68rem;
    font-weight: 900;
}

#commHubModal .comm-hub-density-expanded .timeline-item-compact,
#commHubModal.comm-hub-density-expanded .timeline-item-compact {
    margin-bottom: 1rem !important;
}

#commHubModal.comm-hub-density-expanded .timeline-item-compact .timeline-card > .p-2 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

#commHubModal .comm-hub-rtm-card {
    border: 1px solid #e5e7eb !important;
    border-radius: 8px;
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

#commHubModal .comm-hub-rtm-compact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

#commHubModal .comm-hub-rtm-compact-metric {
    min-width: 0;
    padding: 0.58rem 0.65rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

#commHubModal .comm-hub-rtm-compact-metric span {
    display: block;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.1;
    text-transform: uppercase;
}

#commHubModal .comm-hub-rtm-compact-metric strong {
    display: block;
    margin-top: 0.2rem;
    color: #111827;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.1;
}

#commHubModal .comm-hub-rtm-footnote {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
}

#commHubModal .comm-hub-rtm-metric,
#commHubModal .comm-hub-rtm-progress {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

#commHubModal .comm-hub-rtm-metric {
    padding: 0.68rem 0.75rem;
}

#commHubModal .comm-hub-rtm-progress {
    padding: 0.85rem;
}

#commHubModal .comm-hub-rtm-progress-baseline {
    display: grid;
    grid-template-columns: 0.6fr 1fr 1fr 1fr 0.6fr;
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
}

#commHubModal .comm-hub-rtm-progress-baseline span {
    min-width: 0;
    text-align: center;
}

#commHubModal .comm-hub-rtm-progress-baseline span:first-child {
    text-align: left;
}

#commHubModal .comm-hub-rtm-progress-baseline span:last-child {
    text-align: right;
}

#commHubModal .comm-hub-summary-card {
    background: #fff;
}

#commHubModal .comm-hub-summary-sections {
    display: grid;
    gap: 0;
}

#commHubModal .comm-hub-summary-section {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
    min-height: 34px;
    padding: 0.38rem 0;
    border-top: 1px solid #eef2f7;
}

#commHubModal .comm-hub-summary-section:first-child {
    border-top: 0;
    padding-top: 0;
}

#commHubModal .comm-hub-summary-section:last-child {
    padding-bottom: 0;
}

#commHubModal .comm-hub-summary-section-label {
    min-width: 0;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.2;
}

#commHubModal .comm-hub-summary-section-values {
    display: grid;
    grid-template-columns: minmax(60px, 0.75fr) minmax(96px, 1.25fr);
    gap: 0.65rem;
    align-items: baseline;
    min-width: 0;
}

#commHubModal .comm-hub-summary-chip {
    min-width: 0;
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.22rem;
    padding: 0;
    background: transparent;
    border: 0;
    white-space: nowrap;
}

#commHubModal .comm-hub-summary-chip strong {
    color: #111827;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
}

#commHubModal .comm-hub-summary-chip span {
    min-width: 0;
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.1;
    text-align: right;
    text-transform: none;
}

#commHubModal .comm-hub-summary-chip.is-danger strong,
#commHubModal .comm-hub-summary-chip.is-danger span {
    color: #b42318;
}

#commHubModal .patient-data-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

#commHubModal .patient-data-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-height: 24px;
    padding: 0.18rem 0.45rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    color: #334155;
    background: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

#commHubModal .patient-data-badge.is-alert {
    color: #7c2d12;
    background: #fff7ed;
    border-color: #fed7aa;
}

#commHubModal .patient-data-badge--symptom {
    color: #334155;
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

#commHubModal .patient-data-badge--symptom i {
    color: #64748b;
}

#commHubModal .badge.patient-data-badge--symptom {
    font-size: 0.65rem;
}

#commHubModal .comm-hub-summary-card .hub-metric-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.9rem;
}

#commHubModal .comm-hub-summary-card .hub-metric-value {
    font-size: 1.05rem;
}

#commHubModal .comm-hub-loading-state,
#commHubModal .comm-hub-empty-state,
#commHubModal .comm-hub-error-state {
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
}

/* Call Button Styling */
.comm-hub-call-actions {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(13, 110, 253, 0.18);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
    vertical-align: middle;
}

.comm-hub-call-actions:hover,
.comm-hub-call-actions:focus-within {
    box-shadow: 0 12px 24px rgba(13, 110, 253, 0.24);
    transform: translateY(-1px);
}

.comm-hub-call-actions > .btn {
    min-height: 40px;
    border: 0;
    background-color: #0d6efd;
    color: #fff;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.comm-hub-call-actions > .btn:hover,
.comm-hub-call-actions > .btn:focus {
    background-color: #0b5ed7;
    color: #fff;
    box-shadow: none;
}

.comm-hub-call-actions > .btn:active {
    background-color: #0a58ca;
    box-shadow: none;
}

.comm-hub-call-actions > .btn:disabled,
.comm-hub-call-actions > .btn.disabled {
    background-color: #6c757d;
    opacity: 0.72;
    cursor: not-allowed;
}

#hub-header-call-btn {
    border-radius: 8px 0 0 8px;
    padding: 0 18px;
    font-weight: 700;
    font-size: 0.9375rem;
    gap: 8px;
}

#hub-header-custom-call-toggle {
    border-left: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0 8px 8px 0;
    width: 40px;
    min-width: 40px;
    padding: 0;
}

#hub-header-custom-call-toggle.dropdown-toggle::after {
    margin-left: 0;
}

.comm-hub-call-menu {
    min-width: 190px;
    margin-top: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
}

#commHubCustomCallModal {
    z-index: 1085;
}

.comm-hub-custom-call-modal {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.24);
}

@media (max-width: 991.98px) {
    #commHubModal .communication-hub-container,
    #commHubModal .hub-main-panel,
    #commHubModal .hub-content-area {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    #commHubModal .comm-hub-header-row {
        align-items: flex-start;
        flex-direction: column;
    }

    #commHubModal .comm-hub-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    #commHubModal .comm-hub-left-rail,
    #commHubModal .comm-hub-main-feed,
    #commHubModal .col-lg-7 {
        height: auto !important;
        overflow: visible !important;
    }

    #commHubModal .comm-hub-activity-layout {
        flex-direction: column;
    }

    #commHubModal .comm-hub-left-rail {
        flex-basis: auto;
        width: 100%;
        border-right: 0 !important;
        border-bottom: 1px solid #e5e7eb;
    }
}

@media (max-width: 575.98px) {
    .hub-header {
        padding: 0.85rem 1rem;
    }

    #commHubModal .patient-context {
        min-width: 0;
        width: 100%;
    }

    #commHubModal .comm-hub-header-actions {
        gap: 0.65rem;
    }

    #commHubModal .comm-hub-summary-section {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.25rem;
        align-items: start;
    }

    #commHubModal .comm-hub-summary-section-values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    #commHubModal .comm-hub-summary-chip:first-child {
        justify-content: flex-start;
    }

    #commHubModal .comm-hub-queue-bridge,
    #commHubModal .comm-hub-call-actions {
        flex: 1 1 auto;
    }

    #hub-header-call-btn {
        min-width: 0;
        padding: 0 12px;
    }

    #hub-header-call-btn span {
        white-space: normal;
        line-height: 1.1;
    }

    #commHubModal .comm-hub-metric-grid {
        grid-template-columns: 1fr;
    }

    #commHubModal .comm-hub-main-feed {
        padding: 1rem !important;
    }

    #commHubModal .comm-hub-filter-strip,
    #commHubModal .comm-hub-activity-search {
        flex-basis: 100%;
    }
}

/* Timer Display */
.timer-display .fs-4 {
    font-family: 'JetBrains Mono', 'SF Mono', menlo, monospace;
    color: #1a1d1f;
    letter-spacing: -0.05em;
}
.timer-display .small {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Keypad Dropdown */
.hub-keypad-dropdown { position: absolute; top: 100%; right: 2rem; background: white; border: 1px solid #ddd; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-radius: 12px; padding: 1.5rem; z-index: 100; display: none; margin-top: 10px; }
.hub-keypad-dropdown.show { display: block; }
.keypad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad-btn { font-size: 1.2rem; font-weight: bold; height: 48px; border-radius: 8px; }

/* Pulse Animation for Active Call */
.call-pulse-indicator { position: relative; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(13, 110, 253, 0.1); }
.pulse-ring { position: absolute; inset: 0; border-radius: 50%; animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite; border: 2px solid #0d6efd; }
@keyframes pulse-ring { 0% { transform: scale(0.8); opacity: 0.5; } 100% { transform: scale(1.5); opacity: 0; } }

/* Enhanced RTM Components */
.letter-spacing-1 { letter-spacing: 0.05rem; }
.shadow-xs { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

/* Progress Bar Markers */
.milestone-marker {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 3px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    z-index: 2;
    border-radius: 2px;
    transform: translateX(-50%);
}

/* Timeline Enhancements */
/* Chat Overrides for Timeline */
.activity-timeline .hub-timeline-chat { 
    height: auto !important; 
    max-height: 350px; 
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    gap: 6px;
    padding: 10px 0;
}

/* --- Premium Chat Bubble Styling --- */
.activity-timeline .chat-bubble {
    max-width: 85%;
    padding: 14px 18px;
    margin-bottom: 12px;
    position: relative;
    clear: both;
    font-size: 0.9rem;
    line-height: 1.55;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    word-wrap: break-word;
    white-space: normal !important;
    border: 1px solid transparent;
}

.activity-timeline .chat-bubble:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Chat Bubble Backgrounds */
.chat-incoming { 
    align-self: flex-start; 
    background: #ffffff; 
    border: 1px solid #e2e8f0 !important;
    color: #334155; 
    border-radius: 22px 22px 22px 4px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.chat-outgoing { 
    align-self: flex-end; 
    background: #334155; /* Sophisticated Deep Slate Blue */
    color: #ffffff; 
    border-radius: 22px 22px 4px 22px !important;
    box-shadow: 0 4px 14px rgba(51, 65, 85, 0.15);
    border: 1px solid #1e293b !important;
}

.chat-time { 
    font-size: 0.68rem; 
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block; 
    margin-top: 8px;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.chat-outgoing .chat-time {
    color: #cbd5e1;
    text-align: right;
}

.chat-incoming .chat-time {
    color: #94a3b8;
}

/* Enhanced Hover states for metadata */
.chat-bubble:hover .chat-time {
    color: #64748b;
}

.chat-outgoing:hover .chat-time {
    color: #f1f5f9;
}

/* Special override for SMS Campaign Preview in Modal (Compact Look) */
#sms-campaign-assignment-preview .chat-bubble.chat-outgoing,
#sms-campaign-progress-milestones .chat-bubble.chat-outgoing {
    background: #334155 !important;
    color: #ffffff !important;
    border-radius: 12px 12px 4px 12px !important;
    padding: 10px 14px !important;
    font-size: 0.85rem !important;
    line-height: 1.45 !important;
    border: 1px solid #1e293b !important;
    margin-bottom: 0 !important;
    width: auto !important;
    display: inline-block !important;
    max-width: 100% !important;
    box-shadow: 0 2px 5px rgba(51, 65, 85, 0.1) !important;
}

#sms-campaign-assignment-preview .card-body,
#sms-campaign-progress-milestones .card-body {
    padding: 0 !important;
    background-color: transparent !important;
}

#sms-campaign-assignment-preview .card,
#sms-campaign-progress-milestones .card {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 4px !important;
}

#sms-campaign-assignment-preview .badge.bg-light,
#sms-campaign-progress-milestones .badge.bg-light {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    margin-top: 4px;
}

/* Campaign Reply Block */
.chat-bubble.campaign-reply { 
    background: #fffbeb; 
    color: #92400e; 
    border: 1px solid #fde68a !important; 
    border-radius: 22px 22px 4px 22px !important;
}
.campaign-quote { 
    font-size: 0.85rem; 
    padding: 10px 14px; 
    margin-bottom: 12px; 
    border-radius: 12px; 
    background: rgba(251, 191, 36, 0.1); 
    border-left: 4px solid #fbbf24; 
    color: #92400e; 
}

/* Form inputs */
.chat-input-area .form-control { box-shadow: none; border-color: #dee2e6; }
.chat-input-area .btn { border-color: #dee2e6; }

/* RTM Dashboard */
.x-small { font-size: 0.7rem; }

/* Minimized Floating Overlay */
#comm-hub-minimized-overlay {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 280px;
    background: #fff;
    border-radius: 12px;
    z-index: 2001; /* Above standard Bootstrap modals */
    border: 1px solid #dee2e6;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#comm-hub-minimized-overlay:hover { transform: translateY(-5px); }

/* Buttons in Sidebar */
.btn-comm-hub-minimize { border-radius: 8px; color: #6c757d; }
.btn-comm-hub-minimize:hover { background-color: #f8f9fa; color: #0d6efd; }


/* Unified Component Styles (Transferred from Inline) */
.hub-sidebar-fixed { width: 280px; min-width: 280px; flex-shrink: 0; }

.patient-header-name { font-size: 1.35rem; letter-spacing: -0.025em; font-weight: 700; color: #111827; }
.patient-badge-sm { font-size: 0.8rem; }
.divider-v-40 { height: 32px; width: 1px; background-color: #dee2e6; margin: 0 10px; opacity: 1 !important; }
.divider-v-32 { height: 32px; }

.rtm-month-label { font-size: 0.75rem; }
.rtm-info-icon-sm { font-size: 0.85rem; }
.rtm-billing-pill { 
    font-size: 0.75rem; 
    border: 1px solid rgba(255,255,255,0.5) !important; 
}

.rtm-progress-fixed-height { height: 8px; background-color: #e9ecef; }
.rtm-milestone-container { height: 14px; position: relative; }
.rtm-milestone-label { position: absolute; }
.rtm-milestone-label-center { transform: translateX(-50%); }
.rtm-milestone-label-end { transform: translateX(-100%); }

.activity-timeline { 
    padding-left: 0;
    position: relative; 
    z-index: 1;
    overflow-y: auto !important;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

#commHubModal .comm-hub-upcoming-schedule {
    margin: 0 0 0.85rem;
    padding: 0.75rem;
    border: 1px solid #dce8e1;
    border-radius: 8px;
    background: #f8fbf9;
}

#commHubModal .comm-hub-upcoming-header,
#commHubModal .comm-hub-upcoming-card-main,
#commHubModal .comm-hub-upcoming-card-meta {
    display: flex;
    align-items: center;
}

#commHubModal .comm-hub-upcoming-header {
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

#commHubModal .comm-hub-upcoming-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #166534;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#commHubModal .comm-hub-upcoming-count {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 600;
}

#commHubModal .comm-hub-upcoming-list {
    display: grid;
    gap: 0.5rem;
}

#commHubModal .comm-hub-upcoming-card {
    overflow: hidden;
    border: 1px solid #dbe6df;
    border-left: 3px solid var(--bs-success);
    border-radius: 6px;
    background: #fff;
}

#commHubModal .comm-hub-upcoming-card-main {
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem 0.55rem;
}

#commHubModal .comm-hub-upcoming-card-copy {
    min-width: 0;
}

#commHubModal .comm-hub-upcoming-card-label {
    margin-bottom: 0.1rem;
    color: #198754;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#commHubModal .comm-hub-upcoming-card-title {
    overflow-wrap: anywhere;
    color: #1f2937;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
}

#commHubModal .comm-hub-upcoming-card-next {
    margin-top: 0.18rem;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 600;
}

#commHubModal .comm-hub-upcoming-card-meta {
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.66rem;
}

#commHubModal .comm-hub-upcoming-card-meta span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 0.3rem;
}

#commHubModal .comm-hub-upcoming-details {
    border-top: 1px solid #edf2ef;
}

#commHubModal .comm-hub-upcoming-details summary {
    padding: 0.45rem 0.75rem;
    color: #17643a;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    list-style-position: inside;
}

#commHubModal .comm-hub-upcoming-details summary:hover {
    background: #f4f8f5;
}

#commHubModal .comm-hub-upcoming-details summary:focus-visible {
    outline: 2px solid rgba(25, 135, 84, 0.35);
    outline-offset: -2px;
}

#commHubModal .comm-hub-upcoming-step-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0 0.75rem 0.5rem;
    list-style: none;
}

#commHubModal .comm-hub-upcoming-step {
    display: grid;
    grid-template-columns: minmax(54px, auto) minmax(150px, 1fr) auto;
    gap: 0.25rem 0.6rem;
    padding: 0.45rem 0;
    border-top: 1px solid #eef2f0;
    font-size: 0.66rem;
}

#commHubModal .comm-hub-upcoming-step-order {
    color: #334155;
    font-weight: 700;
}

#commHubModal .comm-hub-upcoming-step-date {
    color: #475569;
}

#commHubModal .comm-hub-upcoming-step-status {
    align-self: start;
    padding: 0.12rem 0.4rem;
    border: 1px solid #cfe5d7;
    border-radius: 50px;
    color: #17643a;
    background: #f2f9f4;
    font-size: 0.6rem;
    font-weight: 700;
}

#commHubModal .comm-hub-upcoming-step-preview {
    grid-column: 2 / -1;
    overflow-wrap: anywhere;
    color: #64748b;
    line-height: 1.35;
}

#commHubModal .comm-hub-timeline-frame {
    position: relative;
    width: 100%;
    max-width: none;
    padding-left: 20px;
}

@media (max-width: 767.98px) {
    #commHubModal .comm-hub-upcoming-schedule {
        padding: 0.65rem;
    }

    #commHubModal .comm-hub-upcoming-step {
        grid-template-columns: 1fr auto;
    }

    #commHubModal .comm-hub-upcoming-step-date,
    #commHubModal .comm-hub-upcoming-step-preview {
        grid-column: 1 / -1;
    }
}

/* Color helper classes for timeline borders */
.border-left-primary { border-left: 4px solid var(--bs-primary) !important; }
.border-left-success { border-left: 4px solid var(--bs-success) !important; }
.border-left-info { border-left: 4px solid var(--bs-info) !important; }
.border-left-danger { border-left: 4px solid var(--bs-danger) !important; }
.border-left-warning { border-left: 4px solid var(--bs-warning) !important; }
.border-left-secondary { border-left: 4px solid var(--bs-secondary) !important; }
.border-left-purple { border-left: 4px solid var(--bs-purple) !important; }

/* Text and Background Utility Classes for Hub Components */
.text-purple { color: var(--bs-purple) !important; }
.bg-purple { background-color: var(--bs-purple) !important; }


/* Sticky Header for Timeline Dates */
.timeline-date-separator {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin: 0 -20px 0.85rem -20px;
    padding: 0.5rem 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(241, 243, 245, 0.5);
}

.timeline-date-separator::before {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, #e9ecef, transparent);
}

.timeline-date-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #e9ecef, transparent);
}

.timeline-date-label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4b5563;
    background: #fff;
    padding: 5px 13px;
    border-radius: 50px;
    border: 1px solid #e5e7eb;
    margin: 0 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    white-space: nowrap;
}

/* Timeline Card Structure */
.timeline-card {
    background: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f3f5;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.timeline-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
    border-color: #e9ecef;
}

.timeline-item-compact {
    margin-bottom: 0.55rem !important;
}

.timeline-item-compact .timeline-icon-compact {
    top: 4px;
    width: 23px;
    height: 23px;
    font-size: 0.62rem;
}

.timeline-item-compact .timeline-card {
    box-shadow: none !important;
    border-color: #edf2f7;
}

.timeline-item-compact .timeline-card:hover {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

.timeline-item-compact .timeline-card > .p-2 {
    padding-top: 0.42rem !important;
    padding-bottom: 0.42rem !important;
}

.timeline-item-compact .timeline-card h6,
.timeline-item-compact .timeline-card p {
    margin-bottom: 0.25rem !important;
}

#commHubModal .comm-hub-log-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.45rem;
    align-items: start;
    margin-top: 0.35rem;
    padding: 0.15rem 0 0.15rem 0.7rem;
    border-left: 3px solid #c7d2fe;
    background: transparent;
}

#commHubModal .comm-hub-log-note-label {
    margin-bottom: 0;
    color: #4f46e5;
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.5;
}

#commHubModal .comm-hub-log-note-text {
    min-width: 0;
    color: #111827;
    font-size: 0.78rem;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}

#commHubModal .comm-hub-attention-reason {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    width: auto;
    margin: 0.35rem 0;
    padding: 0.35rem 0.48rem;
    border: 0;
    border-left: 3px solid #d97706;
    border-radius: 0 6px 6px 0;
    background: #fffbeb;
    color: #78350f;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35;
}

#commHubModal .comm-hub-log-note--needs-review {
    margin-top: 0.4rem;
    padding: 0;
    border-left: 0;
}

#commHubModal .comm-hub-log-note--needs-review .comm-hub-attention-reason {
    margin: 0;
}

#commHubModal .comm-hub-rtm-note-alert-icon {
    flex: 0 0 auto;
    margin-top: 0.08rem;
    color: #b45309;
    font-size: 0.8rem;
}

#commHubModal .comm-hub-rtm-note-alert-title {
    color: #78350f;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
}

#commHubModal .comm-hub-rtm-note-alert-copy {
    margin-top: 0.08rem;
    color: #92400e;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35;
}

#commHubModal .comm-hub-log-note.is-collapsible:not(.is-expanded) .comm-hub-log-note-text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

#commHubModal .comm-hub-log-note-toggle {
    grid-column: 2;
    margin-top: 0.15rem;
    padding: 0 !important;
    border: 0;
    color: #2563eb;
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
}

#commHubModal .comm-hub-log-note-toggle:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

#commHubModal .comm-hub-activity-summary-list {
    display: grid;
    gap: 0.22rem;
    margin: 0.3rem 0 0.5rem;
    padding: 0;
    color: #374151;
    font-size: 0.72rem;
    line-height: 1.35;
    list-style: none;
}

#commHubModal .comm-hub-activity-summary-list li {
    position: relative;
    padding-left: 0.7rem;
    overflow-wrap: anywhere;
}

#commHubModal .comm-hub-activity-summary-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.48em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #94a3b8;
}

#commHubModal .comm-hub-activity-summary-subject {
    color: #111827;
    font-weight: 800;
}

#commHubModal .comm-hub-activity-summary-action {
    color: #475569;
    font-weight: 500;
}

#commHubModal .comm-hub-campaign-context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.45rem;
    margin: 0.2rem 0 0.45rem;
    color: #475569;
    font-size: 0.7rem;
    line-height: 1.25;
}

#commHubModal .comm-hub-campaign-context strong {
    color: #1f2937;
    font-weight: 800;
}

#commHubModal .comm-hub-campaign-context span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0.08rem 0.38rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f8fafc;
    font-size: 0.64rem;
    font-weight: 800;
}

#commHubModal .timeline-item-rtm-group .comm-hub-rtm-group-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    margin: 0.25rem 0 0.45rem;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
}

#commHubModal .timeline-item-rtm-group .comm-hub-rtm-group-summary .is-review {
    color: #92400e;
    font-weight: 800;
}

#commHubModal .timeline-item-rtm-group .timeline-group-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.45rem;
}

#commHubModal .timeline-item-rtm-group .timeline-group-detail-note {
    grid-column: 2;
    min-width: 0;
    color: #374151;
    overflow-wrap: anywhere;
}

#commHubModal .timeline-item-rtm-group .timeline-group-detail-note.is-missing {
    color: #92400e;
    font-weight: 800;
}

@media (max-width: 575.98px) {
    #commHubModal .comm-hub-log-note {
        grid-template-columns: 1fr;
        row-gap: 0.1rem;
    }

    #commHubModal .comm-hub-log-note-toggle {
        grid-column: 1;
    }

    #commHubModal .comm-hub-patient-queue-main {
        grid-template-columns: minmax(0, 1fr);
    }

    #commHubModal #comm-hub-open-patient-queue-btn {
        justify-self: start;
    }
}

.timeline-group-details {
    border-top: 1px solid #f1f3f5;
    padding-top: 10px;
    margin-top: 4px;
}

.timeline-group-details summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-height: 26px;
    padding: 3px 12px;
    border: 1px solid #dee2e6;
    border-radius: 50px;
    background: #f8f9fa;
    color: #6c757d;
    cursor: pointer;
    font-size: 0.725rem;
    font-weight: 600;
    line-height: 1.2;
    list-style: none;
    overflow-wrap: anywhere;
    transition: all 0.2s ease;
    user-select: none;
}

.timeline-group-details summary::-webkit-details-marker {
    display: none;
}

.timeline-group-details summary::before {
    content: "";
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border-right: 1.25px solid currentColor;
    border-bottom: 1.25px solid currentColor;
    transform: translateY(-1px) rotate(-45deg);
    transition: transform 0.2s ease;
    margin-right: 2px;
}

.timeline-group-details[open] summary::before {
    transform: translateY(-2px) rotate(45deg);
}

.timeline-group-details summary:hover {
    background-color: #f1f3f5;
    border-color: #ced4da;
    color: #212529;
}

.timeline-group-details summary:focus {
    outline: none;
}

.timeline-group-details summary:focus-visible {
    border-color: rgba(13, 110, 253, 0.45);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.12);
}

.timeline-group-detail-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.timeline-group-detail-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    padding: 6px 0;
    border-top: 1px solid #f8f9fa;
    font-size: 0.7rem;
    line-height: 1.35;
}

.timeline-group-detail-time {
    font-weight: 700;
    color: #374151;
    min-width: 0;
    white-space: nowrap;
}

.timeline-group-detail-meta,
.timeline-group-detail-sid {
    color: #6b7280;
    min-width: 0;
    overflow-wrap: anywhere;
}

#commHubModal .timeline-item-activity-event .timeline-group-detail-meta {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 0.25rem 0.45rem;
    align-items: baseline;
}

#commHubModal .timeline-item-activity-event .timeline-group-detail-label {
    color: #374151;
    font-weight: 800;
}

#commHubModal .timeline-item-activity-event .timeline-group-detail-status {
    padding: 0.05rem 0.38rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    color: #64748b;
    background: #f8fafc;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: capitalize;
    white-space: nowrap;
}

#commHubModal .timeline-item-activity-event .timeline-group-detail-subject {
    min-width: 0;
    color: #111827;
    font-weight: 700;
}

#commHubModal .timeline-item-activity-event .timeline-group-detail-preview {
    grid-column: 1 / -1;
    color: #6b7280;
    line-height: 1.35;
}

#commHubModal .timeline-group-detail-row.is-warning {
    margin: 3px 0;
    padding: 7px 8px;
    border-top: 0;
    border-left: 3px solid #f59e0b;
    border-radius: 7px;
    background: #fffbeb;
}

#commHubModal .timeline-item-activity-event .timeline-group-detail-row.is-warning .timeline-group-detail-time,
#commHubModal .timeline-item-activity-event .timeline-group-detail-row.is-warning .timeline-group-detail-label {
    color: #92400e;
}

#commHubModal .timeline-item-activity-event .timeline-group-detail-row.is-warning .timeline-group-detail-status {
    color: #92400e;
    background: #fef3c7;
    border-color: #fcd34d;
}

#commHubModal .timeline-item-activity-event .timeline-group-detail-row.is-warning .timeline-group-detail-preview {
    color: #78350f;
    font-weight: 700;
}

.timeline-group-detail-sid {
    grid-column: 2;
    font-size: 0.62rem;
    opacity: 0.8;
}

@media (max-width: 575.98px) {
    .timeline-group-details summary {
        width: 100%;
        justify-content: flex-start;
    }

    .timeline-group-detail-row {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 6px;
    }

    #commHubModal .timeline-item-activity-event .timeline-group-detail-meta {
        grid-template-columns: minmax(0, 1fr);
    }
}

.rtm-duration-pill {
    font-size: 0.6rem;
    font-weight: 700;
    background: #f8f9fa;
    color: #64748b;
    border: 1px solid #e9ecef;
    padding: 2px 10px;
    border-radius: 50px;
    display: inline-block;
}

/* Custom scrollbar for activity timeline */
.activity-timeline::-webkit-scrollbar {
    width: 6px;
}
.activity-timeline::-webkit-scrollbar-track {
    background: transparent;
}
.activity-timeline::-webkit-scrollbar-thumb {
    background: #e9ecef;
    border-radius: 10px;
}
.activity-timeline::-webkit-scrollbar-thumb:hover {
    background: #dee2e6;
}

.timeline-rail-custom { 
    position: absolute; 
    left: 7px; 
    top: 0; 
    bottom: 0; 
    width: 2px; 
    background: #f1f3f5; 
}
.timeline-icon-compact {
    position: absolute;
    left: -20px;
    top: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    z-index: 3;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: var(--bs-box-shadow-sm) !important;
}

.sms-bubble-campaign { font-size: 0.55rem; letter-spacing: 0.5px; font-weight: 700; }

/* SMS Timeline Item Enhancements */
.timeline-item-sms .chat-bubble {
    width: 100%;
    max-width: 100% !important;
    margin-top: 6px;
    border-radius: 16px !important;
    padding: 14px 18px !important;
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
    position: relative;
    border: 1px solid transparent;
    align-self: flex-start !important; /* Force left align in timeline */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.timeline-item-sms .chat-incoming {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
    border-bottom-left-radius: 4px !important;
}

.timeline-item-sms .chat-outgoing {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
    border-bottom-right-radius: 4px !important;
}

.timeline-item-sms .chat-outgoing.campaign-reply {
    background: #fffbeb !important;
    border-color: #fde68a !important;
    color: #92400e !important;
}

.hub-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}
.sms-max-height { max-height: 400px; }

.phone-center-resolution-debug-modal .modal-body {
    padding: 0.9rem;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool {
    margin: 0;
    padding: 0.85rem;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fafc;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-form {
    display: grid;
    gap: 0.75rem;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-title {
    color: #111827;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-title-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0.16rem 0.45rem;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-copy {
    margin-top: 0.1rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    flex: 0 0 auto;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0.32rem 0.72rem;
    border: 1px solid #2563eb;
    border-radius: 8px;
    color: #fff;
    background: #2563eb;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.1;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.18);
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-submit:hover,
.phone-center-resolution-debug-modal .phone-center-resolution-tool-submit:focus-visible {
    color: #fff;
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.24);
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-submit:active {
    background: #1e40af;
    border-color: #1e40af;
    box-shadow: none;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-clear,
.phone-center-resolution-debug-modal .phone-center-resolution-tool-hide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0.32rem 0.64rem;
    border-radius: 8px;
    color: #475569;
    border-color: #cbd5e1;
    background: #fff;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.1;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-clear:hover,
.phone-center-resolution-debug-modal .phone-center-resolution-tool-clear:focus-visible,
.phone-center-resolution-debug-modal .phone-center-resolution-tool-hide:hover,
.phone-center-resolution-debug-modal .phone-center-resolution-tool-hide:focus-visible {
    color: #1f2937;
    border-color: #94a3b8;
    background: #f8fafc;
}

.phone-center-resolution-debug-modal .phone-center-resolution-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.2rem;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #fff;
}

.phone-center-resolution-debug-modal .phone-center-resolution-mode-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin: 0;
    padding: 0.38rem 0.45rem;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #475569;
    background: transparent;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    cursor: pointer;
}

.phone-center-resolution-debug-modal .phone-center-resolution-mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.phone-center-resolution-debug-modal .phone-center-resolution-mode-option.is-active {
    color: #0f172a;
    border-color: #93c5fd;
    background: #eff6ff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.phone-center-resolution-debug-modal .phone-center-resolution-number-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
}

.phone-center-resolution-debug-modal .phone-center-resolution-number-picker label span,
.phone-center-resolution-debug-modal .phone-center-resolution-tool-grid label span,
.phone-center-resolution-debug-modal .phone-center-resolution-advanced-grid label span {
    display: block;
    margin-bottom: 0.25rem;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.phone-center-resolution-debug-modal .phone-center-resolution-number-picker .form-select,
.phone-center-resolution-debug-modal .phone-center-resolution-tool-grid .form-control,
.phone-center-resolution-debug-modal .phone-center-resolution-advanced-grid .form-control,
.phone-center-resolution-debug-modal .phone-center-resolution-advanced-grid .form-select {
    min-height: 34px;
    border-color: #dbe3ef;
    border-radius: 8px;
    font-size: 0.8rem;
    box-shadow: none;
}

.phone-center-resolution-debug-modal .phone-center-resolution-outbound-field {
    display: none;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-form.is-outbound-mode .phone-center-resolution-outbound-field {
    display: block;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-grid small {
    display: block;
    margin-top: 0.22rem;
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.2;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-node {
    min-width: 0;
    padding: 0.42rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-node span {
    display: block;
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-node strong {
    display: block;
    margin-top: 0.12rem;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-arrow {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 0.72rem;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-helper {
    grid-column: 1 / -1;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 750;
    line-height: 1.25;
}

.phone-center-resolution-debug-modal .phone-center-resolution-advanced {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.phone-center-resolution-debug-modal .phone-center-resolution-advanced summary {
    padding: 0.5rem 0.6rem;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 850;
    cursor: pointer;
}

.phone-center-resolution-debug-modal .phone-center-resolution-advanced[open] summary {
    border-bottom: 1px solid #e2e8f0;
    color: #1d4ed8;
    background: #f8fbff;
}

.phone-center-resolution-debug-modal .phone-center-resolution-advanced-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0.6rem;
}

.phone-center-resolution-debug-modal .phone-center-resolution-advanced-grid small {
    display: block;
    margin-top: 0.22rem;
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.2;
}

.phone-center-resolution-debug-modal .phone-center-resolution-locked-card {
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    padding: 0.65rem;
    color: #1e3a8a;
}

.phone-center-resolution-debug-modal .phone-center-resolution-locked-card.is-empty {
    color: #64748b;
    border-color: #dbe3ef;
    background: #fff;
}

.phone-center-resolution-debug-modal .phone-center-resolution-locked-card.is-warning {
    color: #92400e;
    border-color: #fcd34d;
    background: #fffbeb;
}

.phone-center-resolution-debug-modal .phone-center-resolution-locked-card-eyebrow {
    margin-bottom: 0.18rem;
    color: #2563eb;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.phone-center-resolution-debug-modal .phone-center-resolution-locked-card-title {
    color: inherit;
    font-size: 0.78rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.phone-center-resolution-debug-modal .phone-center-resolution-locked-card-copy {
    margin-top: 0.18rem;
    color: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.phone-center-resolution-debug-modal .phone-center-resolution-locked-card-grid {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.28rem 0.55rem;
    margin-top: 0.45rem;
    font-size: 0.7rem;
    line-height: 1.2;
}

.phone-center-resolution-debug-modal .phone-center-resolution-locked-card-grid span {
    color: #64748b;
    font-weight: 800;
    text-transform: uppercase;
}

.phone-center-resolution-debug-modal .phone-center-resolution-locked-card-grid strong {
    color: #0f172a;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-grid label span {
    display: block;
    margin-bottom: 0.25rem;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-grid .form-control {
    min-height: 34px;
    border-color: #dbe3ef;
    border-radius: 8px;
    font-size: 0.8rem;
    box-shadow: none;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-result {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.65rem;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-message,
.phone-center-resolution-debug-modal .phone-center-resolution-tool-summary {
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    padding: 0.65rem;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-message.is-warning,
.phone-center-resolution-debug-modal .phone-center-resolution-tool-summary.is-warning {
    color: #92400e;
    background: #fffbeb;
    border-color: #fcd34d;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-message.is-danger,
.phone-center-resolution-debug-modal .phone-center-resolution-tool-summary.is-danger {
    color: #7f1d1d;
    background: #fef2f2;
    border-color: #fca5a5;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-summary.is-success {
    color: #14532d;
    background: #f0fdf4;
    border-color: #86efac;
}

.phone-center-resolution-debug-modal .phone-center-resolution-identity {
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    padding: 0.65rem;
}

.phone-center-resolution-debug-modal .phone-center-resolution-identity.is-warning {
    background: #fffbeb;
    border-color: #fcd34d;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.78rem;
}

.phone-center-resolution-debug-modal .phone-center-resolution-tool-status span,
.phone-center-resolution-debug-modal .phone-center-resolution-tool-status strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.phone-center-resolution-debug-modal .phone-center-resolution-debug-issues {
    display: grid;
    gap: 0.35rem;
    margin: 0.65rem 0 0;
    padding-left: 1rem;
    color: #92400e;
    font-size: 0.74rem;
    font-weight: 700;
}

.phone-center-resolution-debug-modal .phone-center-resolution-debug-issues span {
    color: #b45309;
    font-size: 0.66rem;
    font-weight: 800;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-steps {
    display: grid;
    gap: 0.4rem;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-step {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.48rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-step.is-ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-step.is-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-step.is-blocked,
.phone-center-resolution-debug-modal .phone-center-resolution-route-step.is-danger {
    border-color: #fecaca;
    background: #fef2f2;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    color: #0f172a;
    background: #e2e8f0;
    font-size: 0.68rem;
    font-weight: 850;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-step-label {
    color: #475569;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.phone-center-resolution-debug-modal .phone-center-resolution-route-step-value {
    margin-top: 0.08rem;
    color: #0f172a;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.phone-center-drawer .phone-center-history-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 0.75rem 0.25rem 0.25rem;
    width: 100%;
    min-width: 0;
}

.phone-center-drawer .phone-center-history-load-more {
    max-width: 100%;
    border-radius: 8px;
    font-weight: 700;
    white-space: normal;
}

@media (max-width: 575.98px) {
    .phone-center-resolution-debug-modal .phone-center-resolution-tool-head,
    .phone-center-resolution-debug-modal .phone-center-resolution-tool-grid,
    .phone-center-resolution-debug-modal .phone-center-resolution-advanced-grid,
    .phone-center-resolution-debug-modal .phone-center-resolution-route-preview {
        grid-template-columns: 1fr;
    }

    .phone-center-resolution-debug-modal .phone-center-resolution-route-helper {
        grid-column: auto;
    }

    .phone-center-resolution-debug-modal .phone-center-resolution-tool-head {
        display: grid;
    }

    .phone-center-resolution-debug-modal .phone-center-resolution-tool-actions {
        width: 100%;
    }

    .phone-center-resolution-debug-modal .phone-center-resolution-tool-submit,
    .phone-center-resolution-debug-modal .phone-center-resolution-tool-clear,
    .phone-center-resolution-debug-modal .phone-center-resolution-tool-hide {
        width: 100%;
    }

    .phone-center-resolution-debug-modal .phone-center-resolution-mode-switch {
        grid-template-columns: 1fr;
    }
}

/* Activity Scroller Cards */
.hub-activity-card strong { max-width: 110px; display: block; }
.hub-activity-card .badge-type { font-size: 0.65rem; letter-spacing: 1px; }

/* --- Metric Cards Overhaul --- */
.hub-metric-card {
    background: #fdfdfd;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease-in-out;
    min-width: 140px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.hub-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.06);
    border-color: #d1d5db;
    background: #ffffff;
}

.hub-metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 1px solid #f1f5f9;
}

.hub-metric-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hub-metric-value {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 3px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.hub-metric-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    white-space: nowrap;
}

/* Color specific icon backgrounds for better polish */
.hub-metric-card:hover .hub-metric-icon {
    background: #fff;
}

/* Incoming Call Floating Card Override */
#voice-incoming-call-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 3000;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    display: none; /* Controlled by .show or JS */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

#voice-incoming-call-toast.show {
    display: block !important;
    opacity: 1;
    transform: translateY(0) scale(1);
}

#voice-incoming-call-toast.showing {
    display: block !important;
}

#voice-incoming-call-toast .card-body {
    padding: 1.25rem;
    text-align: center;
}

#voice-incoming-call-toast.is-queue-notice {
    width: 330px;
}

#voice-incoming-call-toast.is-queue-notice .card-body {
    padding: .95rem;
}

#voice-incoming-call-toast.is-queue-notice .incoming-call-avatar-container,
#voice-incoming-call-toast.is-queue-notice .incoming-call-queue-list {
    display: none !important;
}

#voice-incoming-call-toast.is-queue-notice .patient-name {
    margin-bottom: .2rem;
    font-size: .95rem;
}

#voice-incoming-call-toast.is-queue-notice .call-status {
    margin-bottom: .55rem;
}

#voice-incoming-call-toast.is-queue-notice .incoming-call-queue-meta {
    margin-bottom: .7rem;
}

.incoming-call-avatar-container {
    position: relative;
    width: 66px;
    height: 66px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.incoming-call-avatar {
    width: 58px;
    height: 58px;
    background: #f0f7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0d6efd;
    z-index: 2;
    border: 4px solid #fff;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.15);
}

.ripple-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: 1;
}

.ripple-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.25);
    animation: ripple-v2 2.5s infinite;
}

.ripple-circle:nth-child(2) { animation-delay: 0.8s; }
.ripple-circle:nth-child(3) { animation-delay: 1.6s; }

@keyframes ripple-v2 {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

.floating-call-card .patient-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.25rem;
    letter-spacing: 0;
}

.floating-call-card .call-status {
    font-size: 0.72rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0;
    font-weight: 700;
    margin-bottom: .75rem;
}

.incoming-call-queue-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: .25rem .65rem;
    margin-bottom: .75rem;
    border-radius: 999px;
    background: #eef6ff;
    color: #174ea6;
    font-size: .76rem;
    font-weight: 700;
}

.incoming-call-queue-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-height: 238px;
    overflow-y: auto;
    margin-bottom: .9rem;
    padding-right: .15rem;
    text-align: left;
}

.incoming-call-queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 54px;
    padding: .55rem .65rem;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background: #f8fbff;
}

.incoming-call-queue-copy {
    min-width: 0;
}

.incoming-call-queue-name {
    color: #111827;
    font-size: .86rem;
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.incoming-call-queue-status {
    color: #64748b;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: .15rem;
    text-transform: uppercase;
}

.incoming-call-queue-actions {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    flex: 0 0 auto;
}

.incoming-call-queue-actions .btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.incoming-call-queue-more {
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
    text-align: center;
}

.floating-call-card .action-buttons {
    display: flex;
    gap: 8px;
}

.floating-call-card .action-buttons .btn {
    flex: 1;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-call-card .btn-answer {
    background: #0d6efd;
    border: none;
    color: white;
}

.floating-call-card .btn-answer:hover:not(:disabled) {
    background: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.25);
}

.floating-call-card .btn-decline {
    background: #ffffff;
    border: 1px solid #dbe7f5;
    color: #475569;
}

.floating-call-card .btn-decline:hover:not(:disabled) {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.floating-call-card .btn:active {
    transform: translateY(0);
}

.floating-call-card .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 400px) {
    #voice-incoming-call-toast {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        bottom: 20px;
    }
}
