/* Consolidated stylesheet
 * This file merges the former:
 * - css/custom.css (global app styles)
 * - css/profile_custom.css (profile page styles)
 *
 * Keep this as the single app-level stylesheet to reduce redundancy.
 */

/* ===== Begin: custom.css ===== */

/* Global Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    background-color: #f8f9fa;
    font-family: 'Inter', Arial, sans-serif;
    color: #343a40;
    -webkit-font-smoothing: antialiased;
}

#morningBriefingModal.hidden,
#quickSmsModal.hidden,
#notificationCenterPanel.hidden,
#actionToastContainer.hidden {
    display: none !important;
}

.rc-shell-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1050;
    display: flex;
    width: 100%;
    height: 60px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1rem;
    background: #2f3a46;
    color: #f8fafc;
    border-bottom: 1px solid #25303b;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
    backdrop-filter: none;
    direction: ltr;
    unicode-bidi: isolate;
}

.rc-shell-nav > div {
    display: flex;
    min-width: 0;
    align-items: center;
}

.rc-shell-nav > div:first-child {
    flex: 1 1 auto;
    gap: 1rem;
    overflow: hidden;
}

.rc-shell-nav > div:last-child {
    flex: 0 0 auto;
    gap: 0.65rem;
}

.rc-shell-overlay {
    position: fixed;
    inset: 0;
    z-index: 1150;
}

.rc-shell-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(3px);
}

.rc-shell-dialog {
    position: absolute;
    left: 50%;
    top: 4rem;
    width: min(640px, calc(100vw - 2rem));
    max-height: calc(100dvh - 6rem);
    overflow: hidden;
    transform: translateX(-50%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.rc-shell-dialog--sms {
    top: 6rem;
    width: min(520px, calc(100vw - 2rem));
}

.rc-shell-dialog > div {
    min-width: 0;
}

.rc-shell-dialog > div:first-of-type,
.rc-shell-dialog > div:last-of-type {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.rc-shell-dialog > div:last-of-type {
    justify-content: flex-end;
    border-top: 1px solid #e2e8f0;
    border-bottom: 0;
}

.rc-shell-dialog > div:nth-of-type(2) {
    max-height: calc(100dvh - 13rem);
    overflow-y: auto;
    padding: 1.25rem;
}

.rc-shell-dialog h3,
.rc-shell-dialog h4,
.rc-shell-dialog p {
    margin: 0;
}

.rc-shell-dialog h3 {
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 700;
}

.rc-shell-dialog h4,
.rc-shell-dialog label {
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
}

.rc-shell-dialog button {
    min-height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    background: #fff;
    color: #334155;
    font-weight: 600;
}

.rc-shell-dialog button:hover,
.rc-shell-dialog button:focus {
    border-color: #94a3b8;
    background: #f8fafc;
}

.rc-shell-dialog select,
.rc-shell-dialog textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.75rem;
    background: #fff;
    color: #0f172a;
}

.rc-shell-dialog textarea {
    min-height: 7rem;
}

#briefingHotList,
#briefingDangerList,
#briefingReferralList,
#quickSmsOptions {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

#briefingHotList > div,
#briefingDangerList > div,
#briefingReferralList > div,
#quickSmsOptions > button {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
    background: #f8fafc;
}

.rc-shell-toast-stack {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1200;
    display: grid;
    width: min(320px, calc(100vw - 2rem));
    gap: 0.75rem;
}

.rc-notification-panel {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.rc-notification-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
}

.rc-notification-panel__drawer {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: min(380px, 95vw);
    height: 100%;
    flex-direction: column;
    border-left: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: -20px 0 50px rgba(15, 23, 42, 0.2);
}

.rc-shell-nav * {
    unicode-bidi: isolate;
}

.rc-shell-brand {
    min-width: 0;
}

.rc-shell-brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(99, 102, 241, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.rc-shell-brand-mark--flat {
    width: 38px;
    height: 38px;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.rc-shell-brand-title {
    color: #f8fafc;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.rc-shell-brand-subtitle {
    color: #8fb7ff;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.rc-shell-beta-pill {
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.rc-shell-nav-link {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 0.95rem;
    border-radius: 999px;
    color: #cbd5e1;
    border: 1px solid transparent;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.rc-shell-nav-link:hover,
.rc-shell-nav-link:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.rc-shell-nav-link.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(99, 102, 241, 0.22));
    border-color: rgba(125, 211, 252, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rc-shell-nav-dropdown {
    padding-right: 0.5rem;
}

.rc-shell-inline-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    margin-left: 0.55rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: rgba(244, 63, 94, 0.9);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
}

.rc-shell-search-input {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    box-shadow: none !important;
}

.rc-nav-search {
    width: clamp(13.5rem, 16vw, 18.5rem);
}

.rc-nav-search-shell {
    position: relative;
}

.rc-nav-search .rc-shell-search-input {
    min-height: 2.6rem;
    padding-right: 3rem !important;
}

.rc-nav-search-submit {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.rc-nav-search-submit:hover,
.rc-nav-search-submit:focus {
    background: rgba(59, 130, 246, 0.32);
    color: #ffffff;
    transform: translateY(-50%) translateX(1px);
}

.rc-shell-search-input::placeholder {
    color: #94a3b8 !important;
}

.rc-shell-search-input:focus {
    border-color: rgba(56, 189, 248, 0.35) !important;
    background: rgba(15, 23, 42, 0.92) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.16) !important;
}

.rc-shell-icon-button {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #dbe7f5;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.rc-shell-icon-button:hover,
.rc-shell-icon-button:focus {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(125, 211, 252, 0.26);
    color: #ffffff;
    transform: translateY(-1px);
}

.rc-shell-avatar-button {
    padding: 0.25rem 0.35rem 0.25rem 0.25rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.rc-shell-avatar-button:hover,
.rc-shell-avatar-button:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(125, 211, 252, 0.26);
    transform: translateY(-1px);
}

.rc-shell-avatar-media {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(125, 211, 252, 0.3), rgba(99, 102, 241, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-weight: 700;
}

.rc-shell-dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.rc-shell-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    border-radius: 0.8rem;
    margin: 0 0.45rem;
    width: auto;
}

.rc-shell-dropdown-menu .dropdown-item:hover,
.rc-shell-dropdown-menu .dropdown-item:focus {
    background: rgba(14, 165, 233, 0.08);
    color: #0f172a;
}

.rc-shell-profile-menu {
    padding-top: 0;
}

.rc-shell-profile-header {
    background: linear-gradient(145deg, rgba(14, 23, 42, 0.06), rgba(99, 102, 241, 0.08));
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.rc-shell-mobile-panel {
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 35%),
        linear-gradient(180deg, rgba(7, 12, 24, 0.98), rgba(15, 23, 42, 0.98));
}

.rc-fub-nav-link {
    height: 60px;
    display: inline-flex;
    align-items: center;
    padding: 4px 0.85rem 0;
    color: #e5edf6;
    border-bottom: 4px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.rc-fub-nav-link:hover,
.rc-fub-nav-link:focus {
    color: #ffffff;
    background: #394858;
    outline: none;
}

.rc-fub-nav-link.is-active {
    color: #ffffff;
    background: #26313c;
    border-bottom-color: #22c55e;
    font-weight: 700;
}

.rc-fub-dropdown {
    position: relative;
}

.rc-fub-dropdown-menu {
    position: absolute;
    top: 60px;
    left: 0;
    z-index: 1060;
    min-width: 13rem;
    display: none;
    padding: 0.5rem 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
    color: #1e293b;
}

.rc-fub-dropdown-menu.right-0 {
    left: auto;
    right: 0;
}

.rc-fub-dropdown:hover .rc-fub-dropdown-menu,
.rc-fub-dropdown:focus-within .rc-fub-dropdown-menu {
    display: block;
}

.rc-fub-dropdown-menu a,
.rc-fub-dropdown-menu button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 0;
    background: transparent;
    color: #334155;
    font-size: 0.875rem;
    text-align: left;
    white-space: nowrap;
}

.rc-fub-dropdown-menu a:hover,
.rc-fub-dropdown-menu a:focus,
.rc-fub-dropdown-menu button:hover,
.rc-fub-dropdown-menu button:focus {
    background: #f1f5f9;
    color: #0f172a;
    outline: none;
}

.rc-fub-search {
    width: clamp(13.5rem, 18vw, 19rem);
}

.rc-fub-icon-button {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.rc-fub-icon-button:hover,
.rc-fub-icon-button:focus {
    background: #394858;
    border-color: rgba(34, 197, 94, 0.45);
    color: #ffffff;
    outline: none;
}

.rc-fub-menu-toggle {
    display: inline-flex;
}

@media (min-width: 1024px) {
    .rc-fub-menu-toggle:not(.rc-fub-menu-toggle--desktop) {
        display: none !important;
    }

    .rc-mobile-menu-offcanvas:not(.rc-mobile-menu-offcanvas--desktop) {
        display: none !important;
        visibility: hidden !important;
    }
}

@media (max-width: 1023.98px) {
    .rc-shell-nav .lg\:flex,
    .rc-shell-nav .lg\:block,
    .rc-shell-nav .lg\:inline-flex {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .rc-shell-nav .lg\:flex {
        display: flex !important;
    }

    .rc-shell-nav .lg\:block {
        display: block !important;
    }

    .rc-shell-nav .lg\:inline-flex {
        display: inline-flex !important;
    }
}

.rc-fub-avatar-button {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 2px solid #22c55e;
    background: #e2e8f0;
    color: #475569;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.rc-fub-avatar-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1399.98px) {
    .rc-fub-nav-link {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }

    .rc-fub-search {
        width: 13.5rem;
    }
}

@media (max-width: 1199.98px) {
    .rc-fub-search {
        display: none !important;
    }
}

.rc-shell-mobile-card {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.rc-shell-mobile-section {
    padding: 0 0.75rem;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.rc-shell-mobile-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 0.9rem;
    border-radius: 1rem;
    color: #dbe7f5;
    border: 1px solid transparent;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.rc-shell-mobile-link:hover,
.rc-shell-mobile-link:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.rc-shell-mobile-link.is-active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(99, 102, 241, 0.2));
    border-color: rgba(125, 211, 252, 0.24);
    color: #ffffff;
}

.rc-mobile-bottom-nav {
    display: none;
}

@media (max-width: 991.98px) {
    .rc-mobile-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1045;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: calc(68px + env(safe-area-inset-bottom));
        padding: 5px 8px env(safe-area-inset-bottom);
        border-top: 1px solid rgba(148, 163, 184, 0.28);
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.12);
        backdrop-filter: blur(18px);
    }

    .rc-mobile-bottom-nav__item {
        position: relative;
        display: flex;
        min-width: 0;
        min-height: 56px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 2px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #64748b;
        font-size: 0.68rem;
        font-weight: 700;
        line-height: 1;
        text-decoration: none;
    }

    .rc-mobile-bottom-nav__item i {
        font-size: 1.25rem;
        line-height: 1;
    }

    .rc-mobile-bottom-nav__item.is-active {
        color: #047857;
        background: #ecfdf5;
    }

    .rc-mobile-bottom-nav__add {
        overflow: visible;
        color: #065f46;
    }

    .rc-mobile-bottom-nav__add-icon {
        display: grid;
        width: 48px;
        height: 48px;
        margin-top: -25px;
        place-items: center;
        border: 4px solid #fff;
        border-radius: 999px;
        background: #10b981;
        color: #052e2b;
        box-shadow: 0 8px 20px rgba(16, 185, 129, 0.32);
    }

    .rc-mobile-bottom-nav__add-icon i {
        font-size: 1.4rem;
    }

    .main-content-wrapper {
        padding-bottom: calc(78px + env(safe-area-inset-bottom));
    }

    .main-content-wrapper > footer {
        display: none;
    }

    .content-body .btn,
    .content-body button,
    .content-body .form-control,
    .content-body .form-select {
        min-height: 48px;
    }

    .modal-dialog {
        display: flex;
        min-height: calc(100% - 0.5rem);
        align-items: flex-end;
        margin: 0.5rem 0 0;
        max-width: 100%;
    }

    .modal-content {
        max-height: calc(100dvh - 1rem);
        overflow: hidden;
        border-radius: 16px 16px 0 0;
    }

    .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-footer {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }

    .rc-shell-dialog,
    .rc-shell-dialog--sms {
        top: auto;
        bottom: 0;
        width: 100%;
        max-height: calc(100dvh - 1rem);
        border-radius: 16px 16px 0 0;
    }

    .rc-shell-toast-stack {
        top: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
    }
}

[data-bs-theme="dark"] .rc-mobile-bottom-nav {
    border-top-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.96);
}

[data-bs-theme="dark"] .rc-mobile-bottom-nav__item {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .rc-mobile-bottom-nav__item.is-active {
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.16);
}

[data-bs-theme="dark"] .rc-mobile-bottom-nav__add-icon {
    border-color: #0f172a;
}

.rc-skeleton-stack {
    display: grid;
    gap: 0.7rem;
}

.rc-skeleton-line {
    display: block;
    width: 72%;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: rc-skeleton-shimmer 1.2s ease-in-out infinite;
}

.rc-skeleton-line--wide {
    width: 92%;
    height: 18px;
}

.rc-skeleton-line--short {
    width: 46%;
}

@keyframes rc-skeleton-shimmer {
    to {
        background-position: -200% 0;
    }
}

.task-list-item {
    transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.task-list-item.is-completing {
    opacity: 0.58;
    pointer-events: none;
}

.task-list-item.is-complete {
    opacity: 0;
    transform: translateX(24px);
}

.task-mobile-fab {
    display: none;
}

.rc-client-action-dock {
    display: none;
}

@media (max-width: 991.98px) {
    .task-mobile-fab {
        position: fixed;
        right: 16px;
        bottom: calc(84px + env(safe-area-inset-bottom));
        z-index: 1040;
        display: inline-flex;
        min-height: 52px;
        align-items: center;
        gap: 0.5rem;
        border-radius: 999px;
        padding: 0.75rem 1rem;
        box-shadow: 0 12px 28px rgba(13, 110, 253, 0.28);
    }

    .task-create-sheet {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1060;
        max-height: 88dvh;
        margin: 0 !important;
        overflow-y: auto;
        border-radius: 16px 16px 0 0;
        opacity: 0;
        pointer-events: none;
        transform: translateY(105%);
        transition: opacity 180ms ease, transform 220ms ease;
    }

    .task-create-sheet.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .task-create-sheet .card-body {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
    }

    .task-sheet-open::before {
        position: fixed;
        inset: 0;
        z-index: 1055;
        content: "";
        background: rgba(15, 23, 42, 0.48);
    }

    .rc-mobile-client-profile {
        padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
    }

    .rc-mobile-client-profile > .d-flex:first-child {
        margin-bottom: 1rem !important;
    }

    .rc-mobile-client-profile > .d-flex:first-child .d-flex.gap-3 {
        display: grid !important;
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem !important;
    }

    .rc-mobile-client-profile > .d-flex:first-child .card {
        width: auto !important;
        min-width: 0;
    }

    .rc-mobile-client-profile > .d-flex:first-child .card .small {
        font-size: 0.62rem;
    }

    .rc-mobile-client-profile > .d-flex:first-child .card .h4 {
        font-size: 1rem;
    }

    .rc-mobile-client-profile .action-bar {
        display: none !important;
    }

    .rc-client-action-dock {
        position: fixed;
        right: 10px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        left: 10px;
        z-index: 1044;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding: 7px;
        border: 1px solid rgba(148, 163, 184, 0.25);
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.28);
        backdrop-filter: blur(18px);
    }

    .rc-client-action-dock__action {
        display: flex;
        min-height: 52px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 2px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: #e2e8f0;
        font-size: 0.7rem;
        font-weight: 700;
        text-decoration: none;
    }

    .rc-client-action-dock__action i {
        font-size: 1.1rem;
    }

    .rc-client-action-dock__action--primary {
        background: #10b981;
        color: #052e2b;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rc-skeleton-line {
        animation: none;
    }
}

/* Prevent common mobile horizontal scroll due to wide children */
@media (max-width: 576px) {
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .content-body {
        /* Avoid letter-by-letter breaking which distorts tables/calendars */
        overflow-wrap: break-word;
        word-break: normal;
    }

    /* Tables: prefer horizontal scroll over vertical letter-stacking */
    .table-responsive thead th {
        white-space: nowrap;
    }

    .table-responsive th,
    .table-responsive td {
        overflow-wrap: normal;
        word-break: normal;
    }

    /* FullCalendar: don't allow global breaking rules to distort headers */
    .fc,
    .fc * {
        overflow-wrap: normal;
        word-break: normal;
    }

    .modal-dialog {
        min-height: calc(100% - 0.5rem);
        margin: 0.5rem 0 0;
        max-width: 100%;
    }
}

[data-bs-theme="dark"] body {
    background-color: #212529 !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .main-content-wrapper,
[data-bs-theme="dark"] .content-body {
    background-color: #212529 !important;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #212529;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
    color: #f8f9fa;
}

a {
    text-decoration: none;
    transition: color 0.2s;
}

/* Mobile (small screens) readability */
@media (max-width: 576px) {
    .top-navbar {
        padding: 0.75rem 1rem;
        height: auto;
    }

    .content-body {
        padding: 0.75rem 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 0.75rem;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    pre {
        white-space: pre-wrap;
        word-break: break-word;
    }

    /* Fixed-position alerts/toasts should not overflow on phones */
    .floating-alert {
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
        min-width: 0;
        max-width: none;
    }

    /* Tasks page: keep list items clean and tappable */
    .tasks-page .task-list-item {
        flex-direction: column;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 0.5rem;
    }

    .tasks-page .task-complete-btn {
        width: 100%;
        text-align: center;
    }

    /* Keep the floating chat widget bottom-right; add space on pages with bottom actions */
    .tasks-page {
        padding-bottom: 120px;
    }

    /* Dashboard: keep "Who to Contact Next" items readable + tappable */
    #contact-list .list-group-item {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    #contact-list .btn-group {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-end;
    }

    #contact-list .btn-group .btn {
        flex: 0 0 auto;
    }
}

/* Floating alerts (desktop default) */
.floating-alert {
    min-width: 320px;
    max-width: 420px;
}

/* Ensure tables remain usable on small screens */
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* ===== Agent Chat Widget ===== */
#agent-chat-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.5);
}

.agent-session-item {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
}

.agent-session-item:hover {
    background: #f1f5f9;
}

.agent-session-item.has-unread {
    background: #eef2ff;
    border-left: 3px solid #4f46e5;
}

.agent-msg {
    margin-bottom: 12px;
    display: flex;
}

.agent-msg.visitor {
    justify-content: flex-start;
}

.agent-msg.agent {
    justify-content: flex-end;
}

.agent-msg .bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
}

.agent-msg.visitor .bubble {
    background: white;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-bottom-left-radius: 4px;
}

.agent-msg.agent .bubble {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#agent-chat-badge.pulse {
    animation: pulse-badge 1s ease infinite;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    background-color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

[data-bs-theme="dark"] .card {
    background-color: #2b3035;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #f1f3f5;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

[data-bs-theme="dark"] .card-header {
    border-bottom-color: #373b3e;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Tables */
.table {
    margin-bottom: 0;
    --bs-table-color: #212529;
    --bs-table-bg: transparent;
}

[data-bs-theme="dark"] .table {
    --bs-table-color: #dee2e6;
}

.table th {
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom-width: 1px;
    padding: 1rem;
    background-color: #f8f9fa;
}

[data-bs-theme="dark"] .table th {
    background-color: #343a40;
    color: #adb5bd;
    border-bottom-color: #495057;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom-color: #f1f3f5;
}

[data-bs-theme="dark"] .table td {
    border-bottom-color: #373b3e;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: #343a40;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    border-radius: 6px;
}

/* Dashboard Stats */
.stat-card {
    color: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    transition: transform 0.2s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: white;
}

.stat-card p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Colors */
.bg-blue { background: linear-gradient(135deg, #0d6efd, #0a58ca); }
.bg-green { background: linear-gradient(135deg, #198754, #146c43); }
.bg-teal { background: linear-gradient(135deg, #20c997, #1aa179); }
.bg-yellow { background: linear-gradient(135deg, #ffc107, #ffca2c); color: #212529 !important; }
.bg-yellow h2 { color: #212529; }
.bg-red { background: linear-gradient(135deg, #dc3545, #b02a37); }
.bg-dark-grey { background: linear-gradient(135deg, #343a40, #212529); }

/* Toast */
.toast-container-global {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1080;
}

.toast {
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: none;
}

/* Utilities */
.cursor-pointer { cursor: pointer; }
.text-small { font-size: 0.875rem; }
.fw-medium { font-weight: 500; }

/* Text utilities for dark mode */
[data-bs-theme="dark"] .text-dark { color: #f8f9fa !important; }
[data-bs-theme="dark"] .text-muted { color: #adb5bd !important; }
[data-bs-theme="dark"] .bg-white { background-color: #2b3035 !important; }
[data-bs-theme="dark"] .bg-light { background-color: #343a40 !important; }
[data-bs-theme="dark"] .border { border-color: #495057 !important; }
[data-bs-theme="dark"] .form-control {
    background-color: #212529;
    border-color: #495057;
    color: #f8f9fa;
}
[data-bs-theme="dark"] .form-control:focus {
    background-color: #212529;
    color: #f8f9fa;
}
[data-bs-theme="dark"] .form-select {
    background-color: #212529;
    border-color: #495057;
    color: #f8f9fa;
}

/* Mobile safety: avoid horizontal overflow */
@media (max-width: 576px) {
    input, select, textarea, button {
        max-width: 100%;
    }

    img, video, canvas, iframe {
        max-width: 100%;
        height: auto;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Dark Mode Overrides - Appended */
[data-bs-theme="dark"] .bg-light {
    background-color: #2b3035 !important;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #212529 !important;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .text-dark {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .border {
    border-color: #373b3e !important;
}

[data-bs-theme="dark"] .table {
    color: #f8f9fa;
    border-color: #373b3e;
}

/* ===== Base Template Layout (moved from templates/base.html) ===== */

:root {
    --sidebar-width: 260px;
    --primary-color: #0d6efd;
    --bg-light: #f8f9fa;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
}

[data-bs-theme="dark"] {
    --bg-light: #343a40;
    --text-muted: #adb5bd;
    --border-color: #495057;
}

[data-bs-theme="dark"] .sidebar {
    background-color: #2b3035;
    border-color: #373b3e;
}

[data-bs-theme="dark"] .sidebar-title {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .nav-link {
    color: rgba(255,255,255,0.75);
}

[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .nav-link.active {
    color: #fff;
}

[data-bs-theme="dark"] .top-navbar {
    background-color: #2b3035;
    border-color: #373b3e;
}

[data-bs-theme="dark"] .card {
    background-color: #2b3035;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .card-header {
    border-color: #373b3e;
}

[data-bs-theme="dark"] .text-dark {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #2b3035 !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #343a40;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1045;
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 12px rgba(0,0,0,0.015);
}

.sidebar-header {
    padding: 0.2rem 1rem 0.35rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-brand-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-brand-row .sidebar-logo-link {
    justify-self: center;
}

.sidebar-brand-spacer {
    display: block;
    width: 40px;
    height: 40px;
}

.sidebar-brand-row .notification-bell-btn {
    justify-self: end;
}

.sidebar-logo {
    width: auto;
    height: 70px;
    margin-top: 0.5rem;
    margin-bottom: 0.85rem;
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.sidebar-logo-link {
    display: block;
    line-height: 0;
    transition: transform 0.2s;
}

.sidebar-logo-link:hover {
    transform: scale(1.05);
}

.sidebar-title {
    font-weight: 700;
    font-size: 1rem;
    color: #111;
    margin: 0;
    letter-spacing: -0.02em;
}

.nav-section {
    padding: 0.5rem 0.5rem;
    flex: 1;
    overflow-y: auto;
}

.nav-link {
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 2px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.nav-link i {
    font-size: 1.1rem;
    margin-right: 12px;
    color: #adb5bd;
    transition: color 0.2s;
}

.nav-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.nav-link:hover i {
    color: var(--primary-color);
}

.nav-link.active {
    background-color: rgba(13, 110, 253, 0.08);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active i {
    color: var(--primary-color);
}

.sidebar-footer {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--border-color);
}

.min-width-0 {
    min-width: 0;
}

/* Main Content */
.main-content-wrapper {
    padding-left: 0; padding-top: 60px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: padding-left 0.3s ease-in-out;
}

.main-content-wrapper.no-sidebar {
    padding-left: 0;
}

.top-navbar {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.mobile-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.75rem;
    flex-shrink: 0;
}

.mobile-header-actions .btn,
.mobile-header-actions .badge {
    flex-shrink: 0;
}

.content-body {
    padding: 2rem;
    flex: 1;
}

/* Mobile Responsive */
.header-mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    padding: 0;
    margin-right: 1rem;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.4);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0,0,0,0.1);
    }
    body.sidebar-open {
        overflow: hidden;
        height: 100%;
    }
    .sidebar .nav-section {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }
    .main-content-wrapper {
        padding-left: 0;
    }
    .header-mobile-toggle {
        display: block;
    }
    .sidebar-overlay {
        backdrop-filter: blur(2px);
    }
    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }
    .content-body {
        padding: 1rem;
    }
}

/* Utility Classes */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.4rem 1rem;
}

.btn-sm {
    font-size: 0.85rem;
}

/* Standardized Zen Mode (High Intensity Concentration) */
body.zen-active .sidebar,
body.zen-active .top-navbar,
body.zen-active .breadcrumb,
body.zen-active .sidebar-overlay,
body.zen-active .nav-section {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.zen-active .main-content-wrapper {
    padding-left: 0 !important;
    margin: 0 auto !important;
    max-width: 1400px !important;
}

body.zen-active {
    background-color: #f8f9fa !important;
}

body[data-bs-theme="dark"].zen-active {
    background-color: #0f172a !important;
}

body.zen-active .card {
    box-shadow: 0 40px 80px rgba(0,0,0,0.1) !important;
}

/* Toast */
.toast-container-global {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
}

.toast.toast-high-demand {
    background: linear-gradient(135deg, #b45309 0%, #16a34a 100%);
    color: #ffffff;
}

.toast.toast-high-demand a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 700;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    color: #f8f9fa;
    background-color: rgba(255,255,255,0.05);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #2b3035;
    border-color: #373b3e;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #2b3035;
    border-color: #0d6efd;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #2b3035;
    border-color: #373b3e;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2b3035;
    border-color: #373b3e;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: rgba(255,255,255,0.1);
}

[data-bs-theme="dark"] .modal-content {
    background-color: #2b3035;
    border-color: #373b3e;
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    border-color: #373b3e;
}

[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Custom Button Styles */
.btn-white {
    background-color: #fff;
    border-color: #dee2e6;
    color: #333;
}
.btn-white:hover {
    background-color: #f8f9fa;
    color: #333;
}
[data-bs-theme="dark"] .btn-white {
    background-color: #2b3035;
    border-color: #373b3e;
    color: #f8f9fa;
}
[data-bs-theme="dark"] .btn-white:hover {
    background-color: #343a40;
    color: #fff;
}

/* Fix for icons inside buttons */
.btn .bi {
    font-family: bootstrap-icons !important;
    line-height: 1;
    vertical-align: middle;
}

/* Ensure icons in small buttons are visible and sized correctly */
.btn-sm .bi {
    font-size: 1rem;
}

/* Force Bootstrap Icons font family */
.bi::before,
[class^="bi-"]::before,
[class*=" bi-"]::before {
    font-family: bootstrap-icons !important;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: -0.125em;
    -webkit-font-smoothing: antialiased;
}

/* Kanban Board Utilities */
.cursor-grab {
    cursor: grab;
}
.cursor-grabbing {
    cursor: grabbing;
}

/* ===== End: custom.css ===== */


/* ===== Begin: profile_custom.css ===== */

/* Profile Specific Styles */
.profile-header-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

[data-bs-theme="dark"] .profile-header-card {
    background: #2b3035;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.profile-avatar-large {
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #495057;
    font-size: 2.5rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

[data-bs-theme="dark"] .profile-avatar-large {
    border-color: #343a40;
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    color: #e9ecef;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #212529;
}

[data-bs-theme="dark"] .profile-name {
    color: #f8f9fa;
}

.profile-meta {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .profile-meta {
    color: #adb5bd;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.profile-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    text-align: left;
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 1rem;
}

[data-bs-theme="dark"] .profile-contact-grid {
    background: #212529;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #495057;
}

.contact-item--full {
    grid-column: 1 / -1;
}

[data-bs-theme="dark"] .contact-item {
    color: #adb5bd;
}

.contact-item i {
    color: #adb5bd;
    font-size: 1.1rem;
}

.section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #adb5bd;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .section-card {
    background: #2b3035;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

[data-bs-theme="dark"] .timeline::before {
    background: #495057;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

[data-bs-theme="dark"] .timeline-marker {
    background: #343a40;
    border-color: #495057;
}

.timeline-marker.note { border-color: #ffc107; color: #ffc107; }
.timeline-marker.email { border-color: #0d6efd; color: #0d6efd; }
.timeline-marker.call { border-color: #198754; color: #198754; }
.timeline-marker.task { border-color: #dc3545; color: #dc3545; }

.timeline-content {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    border: 1px solid #f1f3f5;
}

[data-bs-theme="dark"] .timeline-content {
    background: #2b3035;
    border-color: #373b3e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    color: #e9ecef;
}

.timeline-date {
    font-size: 0.75rem;
    color: #adb5bd;
    margin-top: 0.5rem;
    display: block;
}

.list-group-custom .list-group-item {
    border: none;
    border-bottom: 1px solid #f1f3f5;
    padding: 1rem 0;
    background: transparent;
}

[data-bs-theme="dark"] .list-group-custom .list-group-item {
    border-bottom-color: #373b3e;
    color: #e9ecef;
}

.list-group-custom .list-group-item:last-child {
    border-bottom: none;
}

.action-bar {
    position: sticky;
    top: 1rem;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.2);
}

[data-bs-theme="dark"] .action-bar {
    background: rgba(43, 48, 53, 0.9);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* ===== End: profile_custom.css ===== */
