@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap');

/**
 * TaskFlow / Modern Legal-Tech UI Theme
 * Dedicated External Stylesheet
 * Strict requirement: All styling rules reside here, NO inline styles.
 */

:root {
    --tf-bg: #f4f7fb;
    --tf-sidebar-bg: #090e17;
    --tf-sidebar-border: rgba(255, 255, 255, 0.04);
    --tf-sidebar-text: #8e9dae;
    --tf-sidebar-hover: #141c2e;
    --tf-primary: #1d70f5;
    --tf-primary-hover: #155dd1;
    --tf-card-bg: #ffffff;
    --tf-card-border: #edf2f7;
    --tf-card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    --tf-text-dark: #0f172a;
    --tf-text-muted: #64748b;
    --tf-blue-sq: #1d70f5;
    --tf-green-sq: #10b981;
    --tf-amber-sq: #f59e0b;
    --tf-rose-sq: #ef4444;
    --tf-sidebar-width: 260px;
    --tf-topbar-height: 72px;

    /* PPX Inspired Theme Tokens */
    --navy: #07152d;
    --navy2: #0e2445;
    --gold: #d6a63a;
    --gold2: #efc762;
    --bg: #f6f8fb;
    --card: #ffffff;
    --ink: #172033;
    --muted: #718096;
    --line: #e6eaf0;
    --green: #16a36a;
    --red: #e05252;
    --orange: #e89b28;
    --blue: #3277d8;
    --shadow: 0 8px 30px rgba(7, 21, 45, 0.06);
}

/* Global Body Styling */
body {
    background-color: var(--tf-bg);
    color: var(--tf-text-dark);
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* App Wrapper & Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Styling matching TaskFlow */
.app-sidebar {
    width: var(--tf-sidebar-width);
    background-color: var(--tf-sidebar-bg);
    color: var(--tf-sidebar-text);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--tf-sidebar-border);
}

.sidebar-brand {
    min-height: var(--tf-topbar-height);
    display: flex;
    align-items: center;
    padding: 5px 1.5rem;
    border-bottom: 1px solid var(--tf-sidebar-border);
}

.sidebar-logo-img {
    height: 38px;
    width: auto;
    max-width: 175px;
    object-fit: contain;
    display: block;
}


.brand-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1d70f5 0%, #0052cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(29, 112, 245, 0.35);
}

.brand-text-container {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.brand-tagline {
    font-size: 0.68rem;
    color: var(--tf-sidebar-text);
    letter-spacing: 0.2px;
}

.sidebar-org {
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--tf-sidebar-border);
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-org-admin {
    background: rgba(239, 68, 68, 0.08);
}

.sidebar-org-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-org-plan {
    font-size: 0.72rem;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0.85rem;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* Firefox thin scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
    scroll-behavior: smooth;
}

/* Custom Sleek Scrollbar for Sidebar Menu (Admin, Lawyer, Client Panels) */
.sidebar-menu::-webkit-scrollbar,
.app-sidebar::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.sidebar-menu::-webkit-scrollbar-track,
.app-sidebar::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.sidebar-menu::-webkit-scrollbar-thumb,
.app-sidebar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 10px;
    transition: background 0.25s ease, width 0.2s ease;
}

.sidebar-menu:hover::-webkit-scrollbar-thumb,
.app-sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
}

.sidebar-menu::-webkit-scrollbar-thumb:hover,
.app-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.75);
}

.sidebar-menu::-webkit-scrollbar-corner,
.app-sidebar::-webkit-scrollbar-corner {
    background: transparent;
}

.sidebar-heading {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #475569;
    padding: 0.85rem 0.75rem 0.35rem;
}

.sidebar-item {
    margin-bottom: 0.35rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.7rem 0.95rem;
    border-radius: 10px;
    color: var(--tf-sidebar-text);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-link i {
    width: 22px;
    font-size: 1.05rem;
    margin-right: 0.85rem;
    color: #64748b;
    transition: color 0.2s ease;
}

.sidebar-link:hover {
    background-color: var(--tf-sidebar-hover);
    color: #ffffff;
}

.sidebar-link:hover i {
    color: #ffffff;
}

/* Active TaskFlow Pill Style */
.sidebar-link.active {
    background-color: var(--tf-primary);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(29, 112, 245, 0.4);
}

.sidebar-link.active i {
    color: #ffffff;
}

/* Sidebar User Profile & Quick Actions Footer */
.sidebar-user-footer {
    flex-shrink: 0;
    padding: 1.25rem 1rem;
    background: rgba(15, 23, 42, 0.85);
    border-top: 1px solid var(--tf-sidebar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.sidebar-user-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d70f5 0%, #0052cc 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-user-info {
    min-width: 0;
    flex: 1;
}

.sidebar-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.sidebar-user-action-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-user-action-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.sidebar-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.75rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-logout-btn:hover,
.sidebar-logout-btn:focus {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.btn-sidebar-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #cbd5e1;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.05rem;
    transition: all 0.2s ease;
    margin: 5px 0;
    flex-shrink: 0;
}

.btn-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* Upgrade Card at Bottom of Sidebar */
.sidebar-upgrade-widget {
    padding: 1rem;
    margin: 0.5rem 0.85rem 1rem;
    background: linear-gradient(180deg, #131c2e 0%, #0d1524 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    text-align: left;
}

.upgrade-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    margin-bottom: 0.65rem;
}

.upgrade-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.upgrade-desc {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.upgrade-btn {
    display: block;
    width: 100%;
    background-color: var(--tf-primary);
    color: #ffffff;
    text-align: center;
    border-radius: 8px;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, box-shadow 0.2s;
    border: none;
}

.upgrade-btn:hover {
    background-color: var(--tf-primary-hover);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(29, 112, 245, 0.4);
}

/* App Main Canvas */
.app-main {
    flex-grow: 1;
    margin-left: var(--tf-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--tf-bg);
    width: calc(100% - var(--tf-sidebar-width));
}

/* Modern Topbar */
.app-topbar {
    height: var(--tf-topbar-height);
    background: #ffffff;
    border-bottom: 1px solid var(--tf-card-border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-grow: 1;
    max-width: 520px;
}

.topbar-toggle {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 1.15rem;
    color: var(--tf-text-dark);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.topbar-toggle:hover,
.topbar-toggle:focus {
    background-color: #f1f5f9;
    color: var(--tf-primary);
    border-color: #cbd5e1;
}

.topbar-mobile-logo {
    height: 30px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

/* Search Bar Pill */
.topbar-search-pill {
    position: relative;
    width: 100%;
}

.topbar-search-pill i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
}

.topbar-search-input {
    width: 100%;
    background-color: #f4f7fb;
    border: 1px solid transparent;
    border-radius: 100px;
    padding: 0.55rem 1rem 0.55rem 2.5rem;
    font-size: 0.85rem;
    color: var(--tf-text-dark);
    outline: none;
    transition: all 0.2s ease;
}

.topbar-search-input:focus {
    background-color: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 0 0 3px rgba(29, 112, 245, 0.1);
}

.topbar-search-input::placeholder {
    color: #94a3b8;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-bell-btn {
    position: relative;
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    transition: color 0.2s;
    text-decoration: none;
}

.topbar-bell-btn:hover {
    color: var(--tf-text-dark);
}

.topbar-whats-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4f46e5;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.topbar-whats-new-btn:hover {
    color: #3730a3;
    background: #e0e7ff;
    border-color: #c7d2fe;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.15);
}

.topbar-whats-new-btn i {
    color: #6366f1;
    font-size: 0.875rem;
}

@media (max-width: 575.98px) {
    .topbar-whats-new-btn {
        padding: 0.4rem;
        border-radius: 50%;
        background: transparent;
        border: none;
        color: #6366f1;
    }
}

.bell-indicator-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

/* User Profile Badge in Topbar */
.topbar-user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    text-decoration: none;
}

.user-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.user-avatar-admin {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

.user-name-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--tf-text-dark);
    line-height: 1.2;
}

.user-role-text {
    font-size: 0.75rem;
    color: var(--tf-text-muted);
}

/* Main Content Area */
.app-content {
    padding: 2rem;
    flex-grow: 1;
}

/* Greeting Section Header */
.dashboard-greeting-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.greeting-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--tf-text-dark);
    letter-spacing: -0.5px;
    margin-bottom: 0.35rem;
}

.greeting-subtitle {
    font-size: 0.92rem;
    color: var(--tf-text-muted);
    margin-bottom: 0;
}

.greeting-date-box {
    text-align: right;
}

.greeting-date-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--tf-text-dark);
}

.greeting-quote-text {
    font-size: 0.78rem;
    color: var(--tf-text-muted);
    font-style: italic;
}

/* Metric Squircle Cards */
.metric-card {
    background: var(--tf-card-bg);
    border: 1px solid var(--tf-card-border);
    border-radius: 16px;
    padding: 1.4rem 1.25rem;
    box-shadow: var(--tf-card-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -2px rgba(15, 23, 42, 0.08);
}

.squircle-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #ffffff;
    flex-shrink: 0;
}

.squircle-blue {
    background: linear-gradient(135deg, #2563eb 0%, #1d70f5 100%);
    box-shadow: 0 6px 14px rgba(29, 112, 245, 0.25);
}

.squircle-green {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.25);
}

.squircle-amber {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    box-shadow: 0 6px 14px rgba(245, 158, 11, 0.25);
}

.squircle-rose {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.25);
}

.metric-details {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--tf-text-muted);
    margin-bottom: 0.15rem;
}

.metric-counter {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--tf-text-dark);
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.metric-trend {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trend-up {
    color: #10b981;
}

.trend-down {
    color: #ef4444;
}

.trend-neutral {
    color: #64748b;
}

/* Card Container Modern */
.tf-card {
    background: var(--tf-card-bg);
    border: 1px solid var(--tf-card-border);
    border-radius: 16px;
    box-shadow: var(--tf-card-shadow);
    overflow: hidden;
}

.tf-card-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--tf-card-border);
}

.tf-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--tf-text-dark);
    margin: 0;
}

.tf-card-action-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--tf-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.tf-card-action-link:hover {
    color: var(--tf-primary-hover);
    text-decoration: underline;
}

.tf-card-body {
    padding: 1.5rem;
}

/* Status Pill Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.status-pill-amber {
    background-color: #fef3c7;
    color: #b45309;
}

.status-pill-green {
    background-color: #d1fae5;
    color: #047857;
}

.status-pill-red {
    background-color: #fee2e2;
    color: #b91c1c;
}

.status-pill-slate {
    background-color: #f1f5f9;
    color: #475569;
}

.status-pill-blue {
    background-color: #dbeafe;
    color: #1d4ed8;
}

/* Upcoming Deadlines Calendar Date Block */
.deadline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.deadline-item:last-child {
    border-bottom: none;
}

.deadline-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-date-badge {
    width: 46px;
    height: 48px;
    border-radius: 10px;
    background-color: #eff6ff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #dbeafe;
}

.calendar-month {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tf-primary);
    line-height: 1;
}

.calendar-day {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e3a8a;
    line-height: 1.1;
}

.deadline-info-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--tf-text-dark);
    margin-bottom: 0.15rem;
}

.deadline-info-sub {
    font-size: 0.75rem;
    color: var(--tf-text-muted);
}

/* Modern Clean Data Table */
.tf-table {
    width: 100%;
    margin-bottom: 0;
}

.tf-tab.w-120 { width: 120px !important; }
.w-140 { width: 140px !important; }
.w-160 { width: 160px !important; }
.min-w-140 { min-width: 140px !important; }
.min-w-260 { min-width: 260px !important; }

/* Progress bar dynamic width class or variable */
.tf-progress-bar[data-percent],
.quota-progress-bar[data-percent],
.progress-bar[data-percent] {
    width: var(--progress-pct, 0%);
}

.tf-table thead th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--tf-card-border);
}

.tf-table tbody td {
    padding: 0.95rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: var(--tf-text-dark);
}

.tf-table tbody tr:hover td {
    background-color: #fafbfc;
}

/* Custom Checkbox */
.tf-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--tf-primary);
}

/* 3-dots action icon button */
.btn-dots-action {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.15rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
}

.btn-dots-action:hover {
    color: var(--tf-text-dark);
    background-color: #f1f5f9;
}

/* Legend items */
.chart-legend-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.4rem;
}

.bullet-blue { background-color: #1d70f5; }
.bullet-amber { background-color: #f59e0b; }
.bullet-red { background-color: #ef4444; }
.bullet-gray { background-color: #cbd5e1; }
.bullet-green { background-color: #10b981; }

/* Donut Chart & Chart Containers */
.chart-container-box {
    position: relative;
    width: 100%;
    height: 250px;
}

.donut-wrapper-box {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.donut-center-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.donut-center-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--tf-text-dark);
    line-height: 1;
}

.donut-center-text {
    font-size: 0.72rem;
    color: var(--tf-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quota Progress Bar Replacement */
.tf-progress {
    height: 8px;
    background-color: #f1f5f9;
    border-radius: 100px;
    overflow: hidden;
}

.tf-progress-bar {
    height: 100%;
    border-radius: 100px;
    background-color: var(--tf-primary);
    transition: width 0.4s ease;
}

.tf-progress-amber {
    background-color: var(--tf-amber-sq);
}

.tf-progress-red {
    background-color: var(--tf-rose-sq);
}

.tf-progress-green {
    background-color: var(--tf-green-sq);
}

/* Utility width/height classes to replace inline styles */
.size-50 { width: 50px; height: 50px; }
.size-60 { width: 60px; height: 60px; }
.size-64 { width: 64px; height: 64px; }
.size-70 { width: 70px; height: 70px; }
.w-col-130 { width: 130px; }
.w-col-140 { width: 140px; }
.max-w-200 { max-width: 200px; }
.max-w-720 { max-width: 720px; }
.max-h-200-scroll { max-height: 200px; overflow-y: auto; }
.h-10px { height: 10px; }
.w-15pct { width: 15%; }
.cursor-pointer { cursor: pointer; }

/* Dark gradient backgrounds */
.bg-dark-mesh {
    background: linear-gradient(135deg, #090e17 0%, #1e293b 100%);
}

.bg-auth-mesh {
    background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
}

.bg-primary-navy {
    background-color: #090e17 !important;
}

/* Profile, Employee & Role Management Components */
.profile-avatar-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-initials {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--tf-primary);
}

.firm-logo-wrapper {
    width: 110px;
    height: 110px;
    border-radius: 16px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.firm-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Nav Tabs Modern Pill Styling */
.tf-tabs {
    border-bottom: 1px solid var(--tf-card-border);
    gap: 0.5rem;
}

.tf-tabs .nav-link {
    color: var(--tf-text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: none;
    transition: all 0.2s ease;
}

.tf-tabs .nav-link:hover {
    color: var(--tf-text-dark);
}

.tf-tabs .nav-link.active {
    color: var(--tf-primary);
    border-bottom-color: var(--tf-primary);
    background: none;
}

/* Modern Segmented Profile Tabs (Item 9b) */
.profile-tabs-container {
    background: #f1f5f9;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.profile-modern-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border: none !important;
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-modern-tabs::-webkit-scrollbar {
    display: none;
}

.profile-modern-tabs .nav-item {
    flex: 1 1 auto;
    min-width: max-content;
}

.profile-modern-tabs .nav-link {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    border: none;
    border-radius: 12px;
    background: transparent;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    cursor: pointer;
}

.profile-modern-tabs .nav-link:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.65);
}

.profile-modern-tabs .nav-link.active {
    background: #ffffff;
    color: var(--tf-primary, #1d70f5) !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.profile-modern-tabs .nav-link i {
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.profile-modern-tabs .nav-link.active i {
    color: var(--tf-primary, #1d70f5);
    transform: scale(1.08);
}

@media (max-width: 767.98px) {
    .profile-tabs-container {
        padding: 4px;
        border-radius: 12px;
    }
    .profile-modern-tabs .nav-link {
        padding: 8px 13px;
        font-size: 0.82rem;
        gap: 6px;
    }
}

/* Permission Matrix Card */
.perm-module-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    height: 100%;
}

.perm-module-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tf-text-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Plan Subscription Tier Highlights */
.plan-feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #eff6ff;
    color: var(--tf-primary);
}

/* User role pill */
.role-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #334155;
}

.role-pill-lead {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.role-pill-admin {
    background: rgba(29, 112, 245, 0.12);
    color: #1d70f5;
}

.sidebar-backdrop {
    display: none;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .app-sidebar {
        width: 290px;
        max-width: 86vw;
        height: 100%;
        height: 100dvh;
        z-index: 1060;
        box-shadow: 0 0 35px rgba(0, 0, 0, 0.5);
        transform: translateX(-100%);
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    /* Mobile Drawer Overlay Backdrop */
    .sidebar-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1055;
        opacity: 0;
        transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        pointer-events: none;
    }

    .sidebar-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }

    .app-main {
        margin-left: 0;
        width: 100%;
        padding-bottom: 96px;
    }
    .app-topbar {
        padding: 0 1rem;
    }
    .app-content {
        padding: 1.25rem;
    }
}

/* Laptop and Medium Desktop Fine-Tuning (13" to 15" screens: 992px - 1399.98px) */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .app-content {
        padding: 1.5rem;
    }
    .app-topbar {
        padding: 0 1.5rem;
    }
    .modern-hero-header {
        padding: 1.25rem 1.5rem;
    }
    .modern-stat-number {
        font-size: 1.6rem;
    }
    .modern-stat-card {
        padding: 1.1rem 1.15rem;
    }
}

@media (max-width: 575.98px) {
    .modern-stat-card {
        padding: 0.85rem 0.9rem;
        border-radius: 12px;
    }
    .modern-stat-top {
        margin-bottom: 0.5rem;
    }
    .modern-stat-label {
        font-size: 0.72rem;
    }
    .modern-stat-icon {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
        border-radius: 9px;
    }
    .modern-stat-number {
        font-size: 1.35rem;
    }
    .modern-stat-meta {
        font-size: 0.68rem;
    }
}

/* ==========================================================================
   MODERN DASHBOARD REDESIGN, LEAFLET MAP & APPLICATION-STYLE MOBILE DOCK
   Strictly Zero Inline Styles: All component styles defined here
   ========================================================================== */

/* Modern Hero Header */
.modern-hero-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
}

.modern-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(29, 112, 245, 0.08);
    color: var(--tf-primary);
    border: 1px solid rgba(29, 112, 245, 0.18);
    margin-bottom: 0.6rem;
}

/* Modern Metric Cards (Row 1 & 2) */
.modern-stat-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02), 0 10px 20px -3px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.2s;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.modern-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px -4px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.modern-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.modern-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: transform 0.2s ease;
}

.modern-stat-card:hover .modern-stat-icon {
    transform: scale(1.08);
}

.stat-icon-blue {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.stat-icon-green {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.stat-icon-amber {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.stat-icon-red {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.stat-icon-purple {
    background: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
}

.stat-icon-cyan {
    background: rgba(6, 182, 212, 0.12);
    color: #0891b2;
}

.modern-stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.modern-stat-number {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.modern-stat-meta {
    font-size: 0.74rem;
    color: #94a3b8;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Modern Card Wrapper */
.modern-dash-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 18px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.modern-card-header {
    background: #ffffff;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modern-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

/* Application-Style Mobile Bottom Dock (max-width: 991.98px) */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 991.98px) {
    .app-main {
        padding-bottom: 96px;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 12px;
        left: 12px;
        right: 12px;
        height: 68px;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.9);
        border-radius: 24px;
        box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.04);
        z-index: 1045;
        align-items: center;
        justify-content: space-around;
        padding: 5px 0.5rem;
    }

    .mobile-bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #64748b;
        font-size: 0.65rem;
        font-weight: 600;
        padding: 6px 8px;
        border-radius: 14px;
        transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        flex: 1;
        max-width: 68px;
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }

    button.mobile-bottom-nav-item {
        background: transparent;
        border: none;
        outline: none;
        cursor: pointer;
        font-family: inherit;
    }

    .mobile-bottom-nav-item i {
        font-size: 1.22rem;
        margin-bottom: 2px;
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
    }

    .mobile-bottom-nav-item:hover {
        color: var(--tf-primary);
    }

    .mobile-bottom-nav-item:active {
        transform: scale(0.92);
    }

    .mobile-bottom-nav-item.active {
        color: var(--tf-primary);
        background: rgba(29, 112, 245, 0.1);
        font-weight: 700;
    }

    .mobile-bottom-nav-item.active i {
        transform: translateY(-2px) scale(1.08);
        color: var(--tf-primary);
    }

    .mobile-nav-dot {
        width: 4px;
        height: 4px;
        background-color: var(--tf-primary);
        border-radius: 50%;
        margin-top: 1px;
        display: none;
    }

    .mobile-bottom-nav-item.active .mobile-nav-dot {
        display: block;
    }

    /* Elevated Center Hero Action Button (Application Style) */
    .mobile-center-action-wrapper {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0 4px;
    }

    .mobile-center-hero-btn {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: linear-gradient(135deg, #1d70f5 0%, #0052cc 100%);
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        box-shadow: 0 8px 20px rgba(29, 112, 245, 0.45);
        border: 4px solid #ffffff;
        margin-top: -26px;
        text-decoration: none;
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-center-hero-btn:hover {
        color: #ffffff;
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 12px 24px rgba(29, 112, 245, 0.55);
    }

    .mobile-center-hero-btn:active {
        transform: scale(0.92);
    }

    .mobile-center-label {
        font-size: 0.62rem;
        font-weight: 700;
        color: var(--tf-primary);
        margin-top: 2px;
    }
}

/* Sound Effect Trigger Indicator & Mute Button */
.sound-toggle-btn {
    cursor: pointer;
    transition: all 0.2s ease;
}

.sound-toggle-btn.sound-muted {
    opacity: 0.5;
}

/* Leaflet & CARTO OpenStreetMap Indian Advocate Network */
.leaflet-india-map {
    width: 100%;
    height: 480px;
    border-radius: 16px;
    z-index: 10;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.8);
}

.map-card-wrapper {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
}

.leaflet-beacon-marker {
    position: relative;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform-origin: center center;
    pointer-events: auto;
}

.beacon-pulse-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin-top: -18px;
    margin-left: -18px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.28);
    animation: beaconRippler 2.2s infinite ease-out;
    pointer-events: none;
}

@keyframes beaconRippler {
    0% { transform: scale(0.6); opacity: 0.9; }
    100% { transform: scale(2.2); opacity: 0; }
}

.beacon-pin-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    background: linear-gradient(135deg, #1d70f5 0%, #0d47a1 100%);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.leaflet-beacon-marker:hover .beacon-pin-core {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 6px 16px rgba(29, 112, 245, 0.45);
}

/* Custom Styled Leaflet Popup */
.leaflet-popup-content-wrapper {
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    padding: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.leaflet-popup-content {
    margin: 0;
    line-height: 1.5;
    font-family: 'IBM Plex Sans', sans-serif;
}

.map-popup-card {
    padding: 12px 16px;
    min-width: 220px;
}

.map-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.map-popup-city {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.map-popup-state {
    font-size: 0.72rem;
    color: #64748b;
}

.map-popup-stat {
    font-size: 0.82rem;
    color: #334155;
    margin-bottom: 8px;
}

.map-city-leaderboard {
    max-height: 480px;
    overflow-y: auto;
}

.map-city-row {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.map-city-row:hover {
    background-color: #f1f5f9;
}

/* Template Drag and Drop Reordering */
.template-sortable-list {
    min-height: 80px;
}

.template-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.template-card-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

.template-card-item.is-dragging {
    opacity: 0.4;
    border: 2px dashed #3b82f6;
    background: #eff6ff;
}

.template-card-item.drag-over {
    border-top: 3px solid #3b82f6;
}

.drag-handle-btn {
    cursor: grab;
    color: #94a3b8;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.drag-handle-btn:hover {
    color: #1e293b;
    background: #f1f5f9;
}

.drag-handle-btn:active {
    cursor: grabbing;
}

.channel-tag-email {
    background-color: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.channel-tag-whatsapp {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.channel-tag-sms {
    background-color: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Floating Bulk Action Bar for Lawyers Selection */
.floating-bulk-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: #0f172a;
    color: #ffffff;
    border-radius: 50px;
    padding: 0.65rem 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 1040;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-bulk-bar.visible {
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 991.98px) {
    .floating-bulk-bar {
        bottom: 92px;
        width: 92%;
        justify-content: space-between;
        padding: 0.5rem 1rem;
        border-radius: 14px;
    }
}

/* Auto-Refresh Dashboard Controls */
.auto-refresh-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
}

.auto-refresh-spinner {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    animation: refreshPulse 1.5s infinite;
}

.auto-refresh-spinner.paused {
    background-color: #f59e0b;
    animation: none;
}

@keyframes refreshPulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

/* ==========================================================================
   PPX-INSPIRED ADMIN DASHBOARD & INDIAN MAP STYLING (Strictly Zero Inline CSS)
   ========================================================================== */

/* Top Dashboard Cards Grid (6 columns by default) */
.cards {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
    width: 100%;
}

@media (max-width: 1399.98px) {
    .cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 479.98px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

/* 5-Column Dashboard Cards Grid */
.cards.cards-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1399.98px) {
    .cards.cards-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .cards.cards-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 479.98px) {
    .cards.cards-5 {
        grid-template-columns: 1fr;
    }
}

/* Stat Cards */
.card.stat {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 18px 16px;
    min-width: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card.stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(7, 21, 45, 0.08);
}

.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #edf4ff;
    color: var(--blue);
    display: grid;
    place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}

.stat-icon.green {
    background: #ecfdf5;
    color: var(--green);
}

.stat-icon.gold {
    background: #fef3c7;
    color: #b45309;
}

.stat-icon.red {
    background: #fef2f2;
    color: var(--red);
}

.stat-icon.purple {
    background: #f3e8ff;
    color: #7e22ce;
}

.stat-icon.cyan {
    background: #ecfeff;
    color: #0891b2;
}

.stat strong {
    display: block;
    font-size: 28px;
    font-weight: 800;
    margin: 10px 0 6px 0;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat .trend {
    font-size: 12px;
    color: var(--green);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.stat .trend.red {
    color: var(--red);
}

.stat .trend.orange {
    color: var(--orange);
}

.stat .trend.blue {
    color: var(--blue);
}

.stat .trend.muted {
    color: var(--muted);
}

/* Multi-column Grid Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 18px;
    width: 100%;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

@media (max-width: 1024px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Card Panels */
.card.panel {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 0;
    overflow: hidden;
    margin-bottom: 18px;
}

.panel-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: #ffffff;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--navy);
}

.panel-body {
    padding: 18px 20px;
}

/* Auto-Refresh Control Bar */
.dash-refresh-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dash-refresh-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d0e1fd;
    background: #edf4ff;
    color: var(--blue);
    transition: all 0.2s ease;
}

.dash-refresh-badge.paused {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
}

.dash-refresh-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

.dash-refresh-dot.paused {
    background: #94a3b8;
    box-shadow: none;
}

.dash-refresh-btn {
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    color: var(--ink);
    border: 1px solid var(--line);
    cursor: pointer;
    transition: background 0.15s ease;
}

.dash-refresh-btn:hover {
    background: #f8fafc;
}

.dash-refresh-select {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #ffffff;
    cursor: pointer;
    height: 32px;
    color: var(--ink);
}

.dash-settings-link {
    color: var(--muted);
    font-size: 15px;
    text-decoration: none;
    padding: 4px 6px;
    display: inline-flex;
    align-items: center;
}

/* WhatsApp Multi-Account Overview Panel */
.dash-wa-panel {
    border-left: 4px solid #22c55e;
}

.dash-wa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.dash-wa-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-wa-card:hover {
    border-color: #22c55e;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.12);
}

.dash-wa-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}

.dash-wa-default-tag {
    background: #fef3c7;
    color: #92400e;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.dash-wa-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.dash-wa-badge-unread {
    background: #dcfce7;
    color: #15803d;
    font-weight: 800;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dash-wa-badge-read {
    background: #e2e8f0;
    color: #475569;
    font-weight: 600;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.dash-wa-btn-chat {
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid #22c55e;
    color: #15803d;
    background: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.dash-wa-btn-chat:hover {
    background: #22c55e;
    color: #ffffff;
}

/* PPX Indian Map Layout */
.map-layout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    min-height: 520px;
}

.map-canvas-col {
    position: relative;
    background: #edf2f7;
    width: 100%;
    min-height: 520px;
    height: 520px;
}

.map-canvas-col #indiaLegalMap {
    width: 100%;
    height: 100%;
    min-height: 520px;
    z-index: 1;
}

.map-legend-overlay {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(4px);
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    font-size: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.map-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.map-legend-hub-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d6a63a;
    border: 2px solid #ffffff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.map-legend-active-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #16a34a;
}

.map-legend-pending-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d97706;
}

.map-sidebar-col {
    border-left: 1px solid var(--line);
    background: #ffffff;
    display: flex;
    flex-direction: column;
    max-height: 520px;
    height: 520px;
}

.map-sidebar-header {
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-sidebar-title {
    font-size: 13px;
    color: var(--navy);
    font-weight: 700;
}

.map-sidebar-hint {
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
}

.map-sidebar-search-wrap {
    padding: 8px 12px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.map-sidebar-search {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    background: #f8fafc;
}

.map-sidebar-search:focus {
    border-color: var(--gold);
    background: #ffffff;
}

.map-sidebar-list {
    overflow-y: auto;
    flex: 1;
    padding: 4px 0;
}

.map-sidebar-footer {
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid var(--line);
    font-size: 11px;
    color: var(--muted);
    text-align: center;
}

.city-map-item {
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s ease;
}

.city-map-item:hover {
    background: #f8fafc;
}

.city-map-item.active {
    background: #fef3c7;
    border-left: 3px solid #d6a63a;
}

.city-map-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--navy);
}

.city-map-sub {
    color: var(--muted);
    font-size: 11px;
}

.city-map-pill {
    font-weight: 800;
    font-size: 13px;
    background: #fef3c7;
    color: #b45309;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}

.city-map-counts {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
}

/* PPX Marker Pin & Popup */
.india-map-marker-pin {
    background: #d6a63a;
    border: 2px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.india-map-marker-pin:hover {
    transform: scale(1.18);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

.india-map-popup .leaflet-popup-content-wrapper {
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(7, 21, 45, 0.2);
}

.india-map-popup .leaflet-popup-content {
    margin: 0;
    line-height: 1.4;
    font-family: inherit;
}

/* Google Maps InfoWindow Styling for India Legal Map */
.india-legal-map-infowindow .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 24px rgba(7, 21, 45, 0.25) !important;
    max-width: 320px !important;
}

.india-legal-map-infowindow .gm-style-iw-d {
    overflow: hidden !important;
    padding: 0 !important;
    max-height: none !important;
}

.india-legal-map-infowindow .gm-ui-hover-effect {
    top: 4px !important;
    right: 4px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    border-radius: 50% !important;
}

.map-popup-header-navy {
    background: var(--navy);
    color: #ffffff;
    padding: 12px 14px;
}

.map-popup-subtitle-gold {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gold2);
    font-weight: 700;
}

.map-popup-title-bold {
    font-size: 15px;
    font-weight: 800;
    margin-top: 2px;
}

.map-popup-location-small {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}

.map-popup-body-wrap {
    padding: 14px;
}

.map-popup-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.map-popup-grid-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
}

.map-popup-badge-green {
    background: #f0fdf4;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
}

.map-popup-badge-gold {
    background: #fffbeb;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #fef3c7;
}

.map-popup-btn-link {
    display: block;
    text-align: center;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    background: var(--gold);
    color: #172033;
    transition: background 0.15s ease;
}

.map-popup-btn-link:hover {
    background: var(--gold2);
    color: #07152d;
}

@media (max-width: 1024px) {
    .map-layout-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .map-canvas-col,
    .map-canvas-col #indiaLegalMap {
        height: 440px;
        min-height: 440px;
    }
    .map-sidebar-col {
        border-left: none;
        border-top: 1px solid var(--line);
        height: 380px;
        max-height: 380px;
    }
}

/* ==========================================================================
   PPX-INSPIRED MESSAGE TEMPLATES STYLING (Strictly Zero Inline CSS)
   ========================================================================== */

.template-table-panel {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid var(--line);
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
    width: 100%;
}

.template-table {
    width: 100%;
    border-collapse: collapse;
}

.template-table thead tr {
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
}

.template-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
}

.template-table th.th-handle {
    width: 44px;
    text-align: center;
}

.template-table th.th-right {
    text-align: right;
}

.template-row {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.template-row:hover {
    background: #f8fafc;
}

.template-row.dragging {
    opacity: 0.35;
    background: #f0fdf4 !important;
}

.template-row.drag-over-above {
    border-top: 3px solid var(--gold, #d6a63a) !important;
}

.template-row.drag-over-below {
    border-bottom: 3px solid var(--gold, #d6a63a) !important;
}

.drag-handle {
    padding: 14px 12px;
    text-align: center;
    color: #94a3b8;
    font-size: 18px;
    cursor: grab;
    user-select: none;
    transition: color 0.15s ease;
}

.drag-handle:hover {
    color: var(--navy, #07152d) !important;
}

.drag-handle:active {
    cursor: grabbing;
}

.channel-badge-wa {
    background: #dcfce7;
    color: #15803d;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.channel-badge-email {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.channel-badge-sms {
    background: #fef3c7;
    color: #b45309;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.template-code-badge {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    font-family: monospace;
    font-weight: 600;
}

.chip-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    font-family: monospace;
    color: #334155;
    transition: all 0.15s ease;
}

.chip-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: var(--navy);
}

.chip-btn:active {
    transform: scale(0.95);
}

.tmpl-preview-meta-card {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

.tmpl-preview-body-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px;
    background: #ffffff;
    font-size: 14px;
    line-height: 1.6;
}

.tmpl-preview-email-header {
    background: var(--navy, #07152d);
    padding: 16px;
    text-align: center;
    border-radius: 6px 6px 0 0;
    margin: -18px -18px 18px -18px;
    color: #ffffff;
}

.tmpl-preview-email-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 12px;
    margin: 20px -18px -18px -18px;
    border-radius: 0 0 6px 6px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
}

.tmpl-preview-wa-bubble {
    margin: 0;
    font-family: inherit;
    white-space: pre-wrap;
    word-break: break-word;
    background: #efeae2;
    padding: 16px;
    border-radius: 8px;
}

.tmpl-preview-wa-text {
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 8px 8px 8px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    display: inline-block;
    max-width: 100%;
    color: #111b21;
}

#templateReorderToast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--navy, #07152d);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.rotating {
    display: inline-block;
    animation: rotateSpin 1s linear infinite;
}

@keyframes rotateSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Template UI Component Classes - Zero Inline Styles */
.tmpl-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tmpl-acc-select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    padding: 3px 8px;
    border-radius: 7px;
    border: 1px solid var(--line, #e2e8f0);
}

.tmpl-acc-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--navy, #07152d);
}

.tmpl-acc-select {
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 12.5px;
    font-weight: 600;
    background: #f8fafc;
    color: #1e293b;
}

.tmpl-btn-sync {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: var(--navy, #07152d);
    transition: all 0.15s ease;
}

.tmpl-btn-sync:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.tmpl-btn-add {
    background: #d6a63a;
    color: #ffffff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tmpl-btn-add:hover {
    background: #b88a29;
    color: #ffffff;
}

.tmpl-page-head {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.tmpl-head-title {
    margin: 0 0 5px;
    color: var(--navy, #07152d);
    font-size: 22px;
    font-weight: 700;
}

.tmpl-head-subtitle {
    margin: 0;
    color: var(--muted, #64748b);
    font-size: 14px;
}

.tmpl-hint-badge {
    font-size: 12px;
    color: #475569;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tmpl-hint-icon {
    font-size: 14px;
}

.tmpl-hint-handle {
    font-weight: bold;
    font-size: 14px;
    color: var(--navy, #07152d);
    cursor: grab;
}

.tmpl-filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.tmpl-tab-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.tmpl-tab-btn-active {
    background: var(--navy, #07152d);
    color: #ffffff !important;
    border: 1px solid var(--navy, #07152d);
}

.tmpl-tab-btn-inactive {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.tmpl-tab-btn-inactive:hover {
    background: #f8fafc;
    color: var(--navy, #07152d);
    border-color: #94a3b8;
}

.tmpl-panel {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid var(--line, #e2e8f0);
    overflow: hidden;
}

.tmpl-table {
    width: 100%;
    border-collapse: collapse;
}

.tmpl-th-row {
    background: #f8fafc;
    border-bottom: 1px solid var(--line, #e2e8f0);
}

.tmpl-th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy, #07152d);
}

.tmpl-th-handle {
    padding: 14px 12px;
    width: 44px;
    text-align: center;
    font-size: 13px;
    color: var(--navy, #07152d);
}

.tmpl-th-right {
    text-align: right;
}

.tmpl-td {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--navy, #07152d);
}

.tmpl-td-id {
    padding: 14px 16px;
    font-weight: 700;
    color: #64748b;
    font-size: 13px;
}

.tmpl-td-date {
    padding: 14px 16px;
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

.tmpl-td-actions {
    padding: 14px 16px;
    text-align: right;
    white-space: nowrap;
}

.tmpl-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--navy, #07152d);
    margin-bottom: 3px;
}

.tmpl-meta-badge-box {
    margin-bottom: 3px;
}

.tmpl-meta-badge {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    font-family: monospace;
    font-weight: 600;
    display: inline-block;
}

.tmpl-subject {
    font-size: 12px;
    color: #475569;
    margin-bottom: 2px;
}

.tmpl-snippet {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tmpl-status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
}

.tmpl-status-active {
    background: #dcfce7;
    color: #15803d;
}

.tmpl-status-inactive {
    background: #fee2e2;
    color: #b91c1c;
}

.tmpl-btn-preview {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 4px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    color: var(--navy, #07152d);
    cursor: pointer;
    transition: all 0.15s ease;
}

.tmpl-btn-preview:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.tmpl-btn-edit {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 4px;
    background: var(--navy, #07152d);
    color: #ffffff;
    border: 1px solid var(--navy, #07152d);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tmpl-btn-edit:hover {
    background: #0f274e;
    color: #ffffff;
}

.tmpl-btn-delete {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 5px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tmpl-btn-delete:hover {
    background: #fee2e2;
}

.tmpl-empty-state {
    text-align: center;
    padding: 40px;
    color: var(--muted, #64748b);
    font-size: 14px;
}

/* Modals */
.tmpl-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    align-items: center;
    justify-content: center;
}

.tmpl-modal-dialog {
    background: #ffffff;
    padding: 25px 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    margin: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.tmpl-modal-dialog-preview {
    max-width: 620px;
    max-height: 85vh;
}

.tmpl-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line, #e2e8f0);
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.tmpl-modal-title {
    margin: 0;
    color: var(--navy, #07152d);
    font-size: 18px;
    font-weight: 700;
}

.tmpl-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
}

.tmpl-modal-close:hover {
    color: #1e293b;
}

.tmpl-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tmpl-grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
}

.tmpl-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
    color: var(--navy, #07152d);
}

.tmpl-label-note {
    color: var(--muted, #64748b);
    font-weight: normal;
}

.tmpl-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background: #ffffff;
    color: #1e293b;
}

.tmpl-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.tmpl-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    box-sizing: border-box;
    color: #1e293b;
}

.tmpl-input-hint {
    color: var(--muted, #64748b);
    font-size: 11px;
    display: block;
    margin-top: 3px;
}

.tmpl-helper-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 12px;
    border-radius: 8px;
}

.tmpl-helper-title {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.tmpl-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tmpl-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    font-size: 13px;
    font-family: monospace;
    box-sizing: border-box;
    line-height: 1.5;
    background: #ffffff;
    color: #1e293b;
}

.tmpl-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.tmpl-check-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tmpl-checkbox-label {
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #1e293b;
}

.tmpl-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.tmpl-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
    border-top: 1px solid var(--line, #e2e8f0);
    padding-top: 15px;
}

.tmpl-btn-cancel {
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tmpl-btn-cancel:hover {
    background: #f1f5f9;
}

.tmpl-btn-save {
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 700;
    background: #d6a63a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tmpl-btn-save:hover {
    background: #b88a29;
}

.tmpl-preview-meta-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.tmpl-preview-meta-channel {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.tmpl-preview-meta-id-wrap {
    font-size: 12px;
    color: #475569;
    margin-top: 2px;
    display: none;
}

.tmpl-preview-meta-code {
    background: #e2e8f0;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: monospace;
}

.tmpl-preview-meta-subject-wrap {
    font-size: 12px;
    color: #0f172a;
    margin-top: 4px;
}

.tmpl-preview-footer {
    margin-top: 15px;
    text-align: right;
}

.tmpl-btn-close-prev {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    background: var(--navy, #07152d);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tmpl-btn-close-prev:hover {
    background: #0f274e;
}

/* ==========================================================================
   AI Legal Drafter & Court Paper Studio
   ========================================================================== */
.court-paper-wrapper {
    background-color: #f1f3f5;
    padding: 20px;
    border-radius: 8px;
    min-height: 550px;
    max-height: 720px;
    overflow-y: auto;
}

.court-paper {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #dee2e6;
    padding: 40px 48px;
    border-left: 6px solid #0d6efd;
    font-family: 'Times New Roman', Times, serif;
    font-size: 15px;
    line-height: 1.85;
    color: #1a1a1a;
    min-height: 500px;
    white-space: pre-wrap;
    outline: none;
    border-radius: 4px;
}

.court-paper:focus {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.court-paper-placeholder {
    font-style: italic;
    color: #6c757d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.court-paper-actions {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 15px;
}

.ai-refine-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
}

/* Lawyer Dashboard Case Calendar & Cause List */
.cal-table {
    table-layout: fixed;
    margin-bottom: 0;
}
.cal-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    padding: 6px 2px;
    background: #f8fafc;
    text-align: center;
}
.cal-table td {
    height: 48px;
    vertical-align: middle;
    text-align: center;
    padding: 2px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.cal-table td:hover {
    background-color: #f1f5f9;
}
.cal-day-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 2px;
    min-height: 42px;
}
.cal-day-num {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1e293b;
    line-height: 1.1;
}
.cal-day-muted {
    color: #cbd5e1;
}
.cal-cell-today {
    background-color: #fef9c3 !important;
    border: 1px solid #eab308;
}
.cal-cell-selected {
    background-color: #dbeafe !important;
    border: 1px solid #3b82f6;
}
.cal-badge {
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 8px;
    margin-top: 1px;
}

/* ========================================================
   BOTTOM-SHEET SLIDE-UP MODAL ARCHITECTURE (Native App Feel)
   ======================================================== */
.modal.bottom-sheet,
.modal.slide-up,
.modal-bottom-sheet {
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
}

.modal.bottom-sheet.fade,
.modal.slide-up.fade,
.modal-bottom-sheet.fade {
    opacity: 1 !important;
    transition: none !important;
}

.modal.bottom-sheet.fade:not(.show),
.modal.slide-up.fade:not(.show),
.modal-bottom-sheet.fade:not(.show) {
    opacity: 1 !important;
}

.modal.bottom-sheet .modal-dialog,
.modal.slide-up .modal-dialog,
.modal-bottom-sheet .modal-dialog {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 720px !important;
    transform: translate3d(0, 100%, 0) !important;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1) !important;
    pointer-events: auto !important;
    will-change: transform;
}

.modal.bottom-sheet.show .modal-dialog,
.modal.slide-up.show .modal-dialog,
.modal-bottom-sheet.show .modal-dialog {
    transform: translate3d(0, 0, 0) !important;
}

.modal.bottom-sheet.modal-static .modal-dialog,
.modal.slide-up.modal-static .modal-dialog,
.modal-bottom-sheet.modal-static .modal-dialog {
    transform: translate3d(0, -8px, 0) !important;
}

.modal.bottom-sheet .modal-content,
.modal.slide-up .modal-content,
.modal-bottom-sheet .modal-content {
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border: none !important;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.28) !important;
    max-height: 90vh !important;
    max-height: 90dvh !important;
    display: flex !important;
    flex-direction: column !important;
    background-color: #ffffff !important;
    overflow: hidden !important;
}

/* Ensure any nested form acts as flex container */
.modal.bottom-sheet .modal-content > form,
.modal.slide-up .modal-content > form,
.modal-bottom-sheet .modal-content > form {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
}

.modal.bottom-sheet .modal-header,
.modal.slide-up .modal-header,
.modal-bottom-sheet .modal-header {
    flex-shrink: 0 !important;
}

.modal.bottom-sheet .modal-body,
.modal.slide-up .modal-body,
.modal-bottom-sheet .modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 1.25rem 1.5rem !important;
    -webkit-overflow-scrolling: touch;
}

.modal.bottom-sheet .modal-footer,
.modal.slide-up .modal-footer,
.modal-bottom-sheet .modal-footer {
    flex-shrink: 0 !important;
    padding-top: 0.75rem !important;
    padding-bottom: max(1rem, calc(0.75rem + env(safe-area-inset-bottom, 0px))) !important;
    background-color: #f8fafc !important;
    position: relative !important;
    z-index: 10 !important;
}

.bottom-sheet-handle {
    width: 48px;
    height: 5px;
    background-color: #cbd5e1;
    border-radius: 10px;
    margin: 12px auto 4px auto;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .modal.bottom-sheet .modal-dialog,
    .modal.slide-up .modal-dialog,
    .modal-bottom-sheet .modal-dialog {
        max-width: 100% !important;
        margin: 0 !important;
    }
    .modal.bottom-sheet .modal-content,
    .modal.slide-up .modal-content,
    .modal-bottom-sheet .modal-content {
        max-height: 88vh !important;
        max-height: 88dvh !important;
        border-radius: 20px 20px 0 0 !important;
    }
    .modal.bottom-sheet .modal-body,
    .modal.slide-up .modal-body,
    .modal-bottom-sheet .modal-body {
        padding: 1rem 1.25rem !important;
    }
    .modal.bottom-sheet .modal-footer,
    .modal.slide-up .modal-footer,
    .modal-bottom-sheet .modal-footer {
        padding: 0.75rem 1rem !important;
        padding-bottom: max(1.5rem, calc(0.85rem + env(safe-area-inset-bottom, 0px))) !important;
    }
}

/* ==========================================================================
   ADMIN REGISTRATION CHARTS: SINGLE-LINE DATE RANGE FILTER BAR
   Strictly Zero Inline Styles: All component styles defined here
   ========================================================================== */

.chart-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.65rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    width: 100%;
}

.chart-filter-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 0;
    min-width: 0;
}

.chart-filter-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.chart-filter-input {
    width: 100%;
    min-width: 0;
    height: 31px;
    padding: 0.2rem 0.45rem;
    font-size: 0.76rem;
    font-weight: 500;
    color: #1e293b;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    line-height: 1;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chart-filter-input:focus {
    border-color: var(--tf-primary);
    box-shadow: 0 0 0 2px rgba(29, 112, 245, 0.15);
    outline: none;
}

.chart-filter-divider {
    color: #94a3b8;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 0.1rem;
}

.chart-filter-apply-btn {
    flex-shrink: 0;
    height: 31px;
    padding: 0 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #0f172a;
    border-radius: 6px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.chart-filter-apply-btn:hover,
.chart-filter-apply-btn:focus {
    background: #1e293b;
    color: #ffffff;
    border-color: #1e293b;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.chart-filter-apply-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

@media (max-width: 575.98px) {
    .chart-filter-bar {
        padding: 0.35rem 0.45rem;
        gap: 0.3rem;
    }
    .chart-filter-input {
        padding: 0.15rem 0.3rem;
        font-size: 0.7rem;
        height: 28px;
    }
    .chart-filter-label {
        font-size: 0.62rem;
    }
    .chart-filter-apply-btn {
        padding: 0 0.6rem;
        font-size: 0.72rem;
        height: 28px;
    }
}

/* ========================================================
   FILE BROWSE CURSOR VISIBILITY & MODAL PICKER FIX
   ======================================================== */
input[type="file"],
.form-control[type="file"],
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button,
input[type="file"]::-ms-browse {
    cursor: pointer !important;
}

.modal,
.modal-dialog,
.modal-content,
.modal-body,
.modal-header,
.modal-footer {
    cursor: default;
}

/* Prevent GPU layer transform from decoupling mouse cursor when OS file picker opens */
.modal.show .modal-dialog {
    will-change: auto !important;
}

.modal.file-dialog-active .modal-dialog {
    will-change: auto !important;
}

/* ========================================================
   TABLE ACTION COLUMN (1ST POSITION) & ACTION BUTTONS
   ======================================================== */
.table th.col-actions,
.table td.col-actions,
th.col-actions,
td.col-actions {
    width: 1%;
    white-space: nowrap;
    text-align: left;
    vertical-align: middle;
    padding-left: 1rem !important;
    padding-right: 0.75rem !important;
}

.action-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    vertical-align: middle;
    flex-wrap: nowrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #475569;
    text-decoration: none;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.action-btn i {
    font-size: 0.82rem;
}

.action-btn:hover {
    color: #0f172a;
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}

.action-btn:active {
    transform: translateY(0);
}

/* Action Button Variants */
.action-btn-view {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}
.action-btn-view:hover {
    background-color: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(22, 163, 74, 0.28);
}

.action-btn-edit {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.action-btn-edit:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.28);
}

.action-btn-share {
    background-color: #f5f3ff;
    border-color: #ddd6fe;
    color: #6d28d9;
}
.action-btn-share:hover {
    background-color: #7c3aed;
    border-color: #7c3aed;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(124, 58, 237, 0.28);
}

.action-btn-download {
    background-color: #f0f9ff;
    border-color: #bae6fd;
    color: #0369a1;
}
.action-btn-download:hover {
    background-color: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.28);
}

.action-btn-pay {
    background-color: #fefce8;
    border-color: #fef08a;
    color: #a16207;
}
.action-btn-pay:hover {
    background-color: #eab308;
    border-color: #eab308;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(234, 179, 8, 0.28);
}

.action-btn-delete {
    background-color: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}
.action-btn-delete:hover {
    background-color: #e11d48;
    border-color: #e11d48;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(225, 29, 72, 0.28);
}

.action-btn-neutral {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}
.action-btn-neutral:hover {
    background-color: #334155;
    border-color: #334155;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(51, 65, 85, 0.28);
}

/* Ensure button groups and forms in col-actions render inline nicely */
.col-actions .btn-group,
.col-actions .btn-group-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: none !important;
}
.col-actions .btn-group > .btn,
.col-actions .btn-group-sm > .btn {
    border-radius: 8px !important;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin: 0 !important;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.col-actions .btn-group > form,
.col-actions .action-btn-group > form {
    margin: 0;
    display: inline-flex;
}

/* Document Sharing Modal & Cards */
.lawyer-search-result-item {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}
.lawyer-search-result-item:hover,
.lawyer-search-result-item.selected {
    background: #f0f7ff;
    border-color: #3b82f6;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.12);
}

.doc-share-badge-permanent {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.doc-share-badge-timelimited {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.doc-share-badge-expired {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Document Draft & General Modal Scrolling Fix */
.modal-dialog-scrollable .modal-content,
.modal-dialog-scrollable form.modal-content {
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.modal-dialog-scrollable .modal-header,
.modal-dialog-scrollable .modal-footer {
    flex-shrink: 0 !important;
}

.modal-dialog-scrollable .modal-body,
.modal-dialog-scrollable form.modal-content .modal-body,
.modal-dialog-scrollable .modal-content > form > .modal-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    max-height: calc(90vh - 140px) !important;
    -webkit-overflow-scrolling: touch;
}

/* Custom visible scrollbar for modal bodies */
.modal-dialog-scrollable .modal-body::-webkit-scrollbar {
    width: 8px;
}
.modal-dialog-scrollable .modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}


