:root {
    --ads-primary: #0A7BFF;
    --ads-primary-light: #f0f7ff;
    --ads-border: #e2e8f0;
    --ads-border-light: #f1f5f9;
    --ads-radius-md: 8px;
    --ads-radius-lg: 12px;
    --ads-spacing-4: 16px;
    --ads-spacing-5: 20px;
    --ads-spacing-6: 24px;
    --ads-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header .logo img {
    max-height: 36px;
    width: auto;
}

.header .nav-search-inputs .header-context-spacer {
    min-height: 1px;
}

.header .nav-item-box > a {
    position: relative;
}

.header .nav-item-box > a .badge.rounded-pill {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 4px;
}

.header .user-info .badge.badge-success.rounded-pill {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    padding: 0;
    border: 2px solid #fff;
}

.header .user-info .user-letter {
    background: var(--ads-primary);
    overflow: hidden;
}

.header .user-info .user-letter img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.crms-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--ads-primary);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-radius: 5px;
}

.crms-avatar-sidebar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 8px;
    object-fit: cover;
}

.sidebar .clinicdropdown > a .crms-avatar-sidebar.crms-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.novus-stat-card .card-body {
    padding: 1.25rem;
}

.novus-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.novus-chart-card canvas {
    max-height: 320px;
}

.page-header .page-title {
    margin-bottom: 0;
}

.page-header p.text-muted {
    margin-top: 0.25rem;
    font-size: 13px;
}

.empty-state-card {
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state-card .empty-icon {
    font-size: 2.5rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.dropdown-item.border-0.bg-transparent {
    cursor: pointer;
}

.connect-call-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(16, 24, 38, 0.72);
    padding: 1.5rem;
}

.connect-call-overlay.is-open {
    display: flex;
}

.connect-call-card {
    width: min(920px, 100%);
    background: #111827;
    color: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.connect-call-stage {
    position: relative;
    min-height: 420px;
    background: #0b1220;
}

.connect-call-stage video,
.connect-call-stage .connect-call-fallback {
    width: 100%;
    height: 420px;
    object-fit: cover;
    background: #0b1220;
}

.connect-call-local {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 160px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: #1f2937;
}

.connect-call-local video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.connect-call-meta {
    padding: 1.25rem 1.5rem 0;
}

.connect-call-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 1.25rem 1.5rem 1.5rem;
}

.connect-call-actions .btn {
    min-width: 48px;
}

.chat-page-wrapper .connect-empty-chat {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.user-list-item.is-active > a {
    background: #f4f7fb;
}

.message-content img.connect-message-image {
    max-width: 240px;
    border-radius: 12px;
}

.connect-toast-host {
    position: fixed;
    top: 88px;
    right: 20px;
    z-index: 1090;
}

/* Connect chat shell + compact app nav */
.connect-chat-shell {
    min-height: calc(100vh - 60px);
}

body.main-chat-blk .sidebar {
    display: none;
}

body.main-chat-blk .page-wrapper,
body.main-chat-blk .connect-chat-shell .page-wrapper {
    margin-left: 0;
}

.connect-app-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding: 8px 16px;
    background: #f4f7fb;
    border-bottom: 1px solid #e6ecf2;
}

.connect-app-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    color: #0A7BFF;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.connect-app-nav a:hover {
    background: rgba(0, 51, 102, 0.08);
}

.connect-app-nav a.is-active {
    background: #0A7BFF;
    color: #fff;
}

.connect-list-empty {
    line-height: 1.4;
}

.connect-list-empty strong {
    display: block;
    margin-bottom: 4px;
}

.connect-thread-loading {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55);
}

.chat.chat-messages {
    position: relative;
}

.connect-chat-loading .connect-thread-loading {
    display: flex;
}

.connect-thread-empty .empty-icon,
.connect-empty-chat .empty-icon,
.empty-state-card .empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 51, 102, 0.08);
    color: #0A7BFF;
    font-size: 1.5rem;
}

/* Soften reaction chrome on desktop; keep visible for touch */
.message-content .connect-reaction-chrome {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.message-content:hover .connect-reaction-chrome,
.message-content:focus-within .connect-reaction-chrome,
.chats:focus-within .connect-reaction-chrome {
    opacity: 1;
}

@media (hover: none), (max-width: 991.98px) {
    .message-content .connect-reaction-chrome {
        opacity: 1;
    }
}

.chat-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 2;
}

.connect-attachment-chip .badge {
    font-weight: 500;
}

.connect-upload-progress {
    margin-bottom: 4px;
}

/* Messenger-style lists (calls / notifications) */
.connect-messenger-list {
    overflow: hidden;
}

.connect-call-row,
.connect-notify-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f6;
}

.connect-call-row:last-child,
.connect-notify-row:last-child {
    border-bottom: 0;
}

.connect-call-row__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 51, 102, 0.08);
    color: #0A7BFF;
    flex-shrink: 0;
}

.connect-call-row.is-missed .connect-call-row__icon,
.connect-call-row.is-missed .connect-call-row__name {
    color: #b42318;
}

.connect-call-row__name {
    display: block;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
}

.connect-call-row__name:hover {
    color: #0A7BFF;
    text-decoration: underline;
}

.connect-call-row__meta {
    font-size: 0.85rem;
    color: #6b7c93;
}

.connect-notify-row.is-unread {
    background: #f7fafc;
}

.empty-state-card {
    text-align: center;
    padding: 2rem 1.5rem;
}
