:root {
    /* Branding Colors - Original Vibrant Indigo */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --sidebar-bg: #1a1d21;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;

    /* GLOBAL OVERRIDES: Remove Bootstrap Shadows */
    --bs-box-shadow: none !important;
    --bs-box-shadow-sm: none !important;
    --bs-box-shadow-lg: none !important;
    --bs-box-shadow-inset: none !important;

    /* Safe area insets for mobile app (notch, status bar) */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    margin: 0;
    overflow-x: hidden;
    width: 100%;
}

/* --- GLOBAL TABLES (DESKTOP) --- */
.table { 
    width: 100%; 
    border-collapse: collapse !important; 
    margin-bottom: 0;
}

.table th { 
    font-weight: 700 !important; /* Headers ONLY are bold */
    color: var(--text-main);
    background: #f8fafc;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 15px !important;
    border-bottom: 2px solid var(--border-color) !important;
    white-space: nowrap;
}

.table td { 
    padding: 25px 15px !important; /* THE REQUESTED DEPTH */
    border-bottom: 1px solid var(--border-color) !important;
    font-weight: 400 !important; /* STRICTLY NO BOLD DATA */
    color: var(--text-main);
    vertical-align: middle;
}

/* Force Actions and money columns to align right */
.text-end { text-align: right !important; }
.text-center { text-align: center !important; }
.text-start { text-align: left !important; }

/* --- SIDEBAR LAYOUT --- */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0; left: 0;
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform 0.3s ease;
    border-right: 1px solid rgba(255,255,255,0.05);
}

/* Make the middle nav section scrollable, keep logout visible */
.sidebar .flex-grow-1 {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
    padding-bottom: 20px;
}

/* Custom scrollbar for sidebar */
.sidebar .flex-grow-1::-webkit-scrollbar {
    width: 6px;
}
.sidebar .flex-grow-1::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar .flex-grow-1::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}
.sidebar .flex-grow-1::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* Ensure logout button area doesn't shrink */
.sidebar .border-top {
    flex-shrink: 0;
    background: var(--sidebar-bg);
}

.main-content {
    margin-left: 260px;
    padding: 40px;
    min-height: 100vh;
    width: auto;
    max-width: 100%;
}

.mobile-nav {
    display: none;
    background: white;
    padding: 12px 20px;
    padding-top: calc(12px + var(--safe-area-top));
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1040;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1045;
}

/* --- SIDEBAR NAVIGATION --- */
.brand { 
    padding: 30px 25px; 
    font-size: 1.4rem; 
    font-weight: 800; 
    letter-spacing: -1px; 
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.brand span { color: var(--primary-color); }

.sidebar-label { 
    padding: 25px 25px 10px 25px; 
    color: #4b5563; 
    font-weight: 700; 
    text-transform: uppercase; 
    font-size: 0.7rem; 
    letter-spacing: 0.05em; 
    display: block; 
}

/* Scoped specifically to sidebar to avoid breaking sub-tabs */
.sidebar .nav-link { 
    color: #94a3b8; 
    padding: 14px 25px; 
    display: flex; 
    align-items: center; 
    border-left: 4px solid transparent; 
    text-decoration: none; 
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar .nav-link i { 
    width: 28px; /* FIXED WIDTH: aligns text perfectly */
    margin-right: 12px; 
    font-size: 1.1rem; 
    text-align: center;
    flex-shrink: 0;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active { 
    color: white !important; 
    background: rgba(255,255,255,0.05); 
    border-left-color: var(--primary-color); 
}

.sidebar .nav-link.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
}

/* --- SIDEBAR DROPDOWN MENUS --- */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex !important;
    justify-content: space-between;
    cursor: pointer;
}

.nav-dropdown-toggle .dropdown-arrow {
    width: auto !important;
    margin-right: 0 !important;
    margin-left: auto;
    font-size: 0.7rem !important;
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.nav-dropdown.open .dropdown-arrow {
    transform: rotate(90deg);
    opacity: 1;
}

.nav-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    background: rgba(0,0,0,0.15);
}

.nav-dropdown.open .nav-dropdown-menu {
    max-height: 200px;
}

.sidebar .nav-link.sub-link {
    padding: 10px 25px 10px 45px;
    font-size: 0.88rem;
    border-left: 4px solid transparent;
}

.sidebar .nav-link.sub-link i {
    width: 22px;
    font-size: 0.85rem;
    margin-right: 10px;
}

.sidebar .nav-link.sub-link:hover,
.sidebar .nav-link.sub-link.active {
    background: rgba(255,255,255,0.08);
    border-left-color: var(--primary-color);
    color: white !important;
}

/* --- PAGE HEADERS & ACTION HUB --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 15px;
    flex-wrap: nowrap;
}
.action-hub, .action-stack {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.action-hub .btn, .action-stack .btn { white-space: nowrap; min-width: fit-content; }

@media (max-width: 768px) {
    .page-header { flex-direction: column; align-items: stretch; text-align: left; flex-wrap: wrap; }
    .action-hub, .action-stack { flex-direction: column; gap: 10px; width: 100%; flex-wrap: wrap; }
    .action-hub .btn, .action-hub form, .action-hub form button,
    .action-stack .btn, .action-stack form, .action-stack form button { width: 100% !important; text-align: center; }
    
    /* Ticket Details Header Stack */
    .ticket-header { flex-direction: column; align-items: flex-start !important; gap: 15px; }
}

/* --- STAT & SUMMARY CARDS --- */
.stats-grid, .summary-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px;
}
.stat-card, .summary-card { 
    background: white; padding: 20px; border-radius: 12px; border: 1px solid var(--border-color); 
    text-decoration: none; color: inherit; text-align: left; 
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--primary-color); }
.stat-card h3, .summary-label { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); margin: 0 0 8px 0; font-weight: 700; }
.stat-card .value, .summary-value { font-size: 1.5rem; font-weight: 800; color: var(--text-main); }

/* --- STACKABLE TABLES (MOBILE CARD VIEW) --- */
.card { 
    border-radius: 12px; 
    border: 1px solid var(--border-color) !important; 
    background: white; 
    overflow: hidden; 
    max-width: 100%; 
}

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); padding-top: var(--safe-area-top); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 15px; width: 100%; max-width: 100vw; }
    .mobile-nav { display: flex; justify-content: space-between; align-items: center; background: white; padding: 12px 20px; padding-top: calc(12px + var(--safe-area-top)); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1040; }
    .sidebar-overlay.active { display: block; }

    .stackable thead { display: none; }
    
    .stackable tr { 
        display: block; 
        padding: 25px 15px !important; 
        border-bottom: 10px solid var(--bg-light); 
        background: white; 
        width: 100%;
        position: relative;
    }
    
    /* Hide the first column if it has no data-label (usually ID or Toggle) */
    .stackable td:first-child:not([data-label]) { display: none !important; }

    .stackable td { 
        display: flex !important; 
        align-items: flex-start !important; 
        text-align: left !important; 
        padding: 8px 0 !important; 
        border: none !important; 
        width: 100%;
        min-width: 0;
        overflow-wrap: anywhere; 
        word-break: break-word;
    }
    
    .stackable td::before { 
        content: attr(data-label); 
        width: 35%; 
        min-width: 35%; 
        font-weight: 800; 
        text-transform: uppercase; 
        font-size: 0.6rem; 
        color: var(--text-muted); 
        padding-right: 10px;
        flex-shrink: 0;
        margin-top: 3px;
    }

    .stackable td > div, .stackable td > span, .stackable td > a { 
        flex-grow: 1; 
        min-width: 0; 
    }
    
    /* Action Row (Buttons) */
    .stackable td:last-child { 
        border-top: 1px solid var(--border-color) !important; 
        margin-top: 12px; 
        padding-top: 18px !important; 
        display: flex !important; 
        gap: 10px;
        justify-content: flex-start !important;
    }
    .stackable td:last-child::before { display: none; }
}

/* --- SUB-NAV TABS (READABLE COLORS) --- */
.nav-tabs-scrollable {
    display: flex; flex-wrap: nowrap; overflow-x: auto; border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px; -webkit-overflow-scrolling: touch; background: white;
    position: relative; z-index: 10;
}
.nav-tabs-scrollable::-webkit-scrollbar { display: none; }

.nav-tabs-scrollable .nav-link {
    white-space: nowrap; border: none !important; padding: 15px 20px !important; 
    color: var(--text-muted) !important; /* Force dark gray */
    font-weight: 700 !important; font-size: 0.85rem !important; 
    border-bottom: 3px solid transparent !important; cursor: pointer; 
    background: transparent !important; border-radius: 0 !important;
}

.nav-tabs-scrollable .nav-link:hover { color: var(--text-main) !important; }

.nav-tabs-scrollable .nav-link.active { 
    color: var(--primary-color) !important; 
    border-bottom-color: var(--primary-color) !important; 
}

/* --- BILLING EMAIL CHIPS --- */
.multi-email-container { 
    display: flex; flex-wrap: wrap; align-items: center; 
    border: 1px solid var(--border-color); border-radius: 8px; 
    padding: 4px; background: #fff; min-height: 38px;
}
.email-chip { 
    display: inline-flex; align-items: center; 
    background-color: #f1f5f9; color: var(--text-main); 
    font-size: 0.75rem; font-weight: 600; padding: 4px 10px; 
    margin: 2px; border-radius: 20px; border: 1px solid var(--border-color);
}
.email-chip i { cursor: pointer; margin-left: 8px; font-size: 0.7rem; color: var(--text-muted); }
.email-chip i:hover { color: #ef4444; }
.email-input-typer { border: none; outline: none; flex: 1; min-width: 80px; padding: 4px 8px; font-size: 0.85rem; }

/* --- MISC UI --- */
canvas { width: 100% !important; }
.table-sm td, .table-sm th { padding: 12px 15px !important; }
.alert { border-radius: 10px; border: 1px solid var(--border-color); }
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; border-radius: 6px; font-weight: 600; font-size: 0.65rem; text-transform: uppercase; }
.btn-white-custom { background: #fff; border: 1px solid #cbd5e1; color: #475569; font-weight: 600; }
.btn-white-custom:hover { background: #f8fafc; border-color: #94a3b8; color: #1e293b; }
.cursor-help { cursor: help; }

.btn-group .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 38px !important; /* Fixed height ensures they always match */
    padding: 0 15px !important;
    line-height: 1 !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
}

/* Fix the icon specifically to ensure it doesn't float high */
.btn-group .btn i {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    display: block !important;
    font-size: 1rem !important;
}

/* Remove double border where buttons meet */
.btn-group .btn + .btn {
    margin-left: -1px !important;
}

.main-content.no-sidebar {
    margin-left: 0 !important;
    width: 100%;
}

/* Ensure the mobile header also hides when sidebar is disabled */
.hide-nav {
    display: none !important;
}

/* Force the content to ignore the sidebar space */
.main-content.no-sidebar {
    margin-left: 0 !important;
    padding: 0 !important; /* Removes outer padding for login screens */
    /* Add safe area padding for mobile app (notch, status bar) */
    padding-top: var(--safe-area-top) !important;
    padding-bottom: var(--safe-area-bottom) !important;
    width: 100% !important;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    display: flex;
    flex-direction: column;
}

/* If it's a dashboard-style page without a sidebar (like the Platform Admin) 
   we want some internal padding back so text isn't touching the screen edge */
.main-content.no-sidebar .container-fluid,
.main-content.no-sidebar .container {
    padding: 40px;
}

/* This fixes the login card alignment specifically */
.main-content.no-sidebar > .row {
    margin: 0;
    width: 100%;
    flex-grow: 1;
}

/* --- AI CHATBOT WIDGET --- */
.chat-toggle-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    z-index: 1060;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.chat-panel {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 380px;
    height: 520px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    z-index: 1060;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.chat-panel.active {
    display: flex;
}

.chat-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

.chat-message {
    max-width: 88%;
    animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message.user {
    align-self: flex-end;
}

.chat-message.assistant {
    align-self: flex-start;
}

.chat-message .message-content {
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
    font-size: 0.9rem;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant .message-content {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.chat-message .message-content strong {
    font-weight: 700;
}

.chat-message .message-content code {
    background: rgba(0,0,0,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

.chat-message.user .message-content code {
    background: rgba(255,255,255,0.2);
}

.chat-confirmation {
    padding: 16px;
    background: #fef3c7;
    border-top: 1px solid #fbbf24;
    flex-shrink: 0;
}

.chat-typing {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    background: #f8fafc;
    flex-shrink: 0;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.chat-input-area {
    display: flex;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    gap: 10px;
    background: white;
    flex-shrink: 0;
}

.chat-input-area input {
    flex: 1;
    min-width: 0; /* Prevents flex item overflow */
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 16px;
    outline: none;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.chat-input-area input:focus {
    border-color: var(--primary-color);
}

.chat-input-area button {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Responsive: Full screen on mobile */
@media (max-width: 768px) {
    .chat-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        max-height: 100dvh !important; /* Dynamic viewport height for mobile */
        border-radius: 0;
        margin: 0;
    }

    .chat-toggle-btn {
        bottom: 16px;
        right: 16px;
        width: 50px;
        height: 50px;
    }

    .chat-header {
        padding: 14px 16px;
        padding-top: max(14px, env(safe-area-inset-top));
    }

    .chat-messages {
        padding: 12px;
        flex: 1;
        min-height: 0; /* Fixes flex overflow issues */
    }

    .chat-input-area {
        padding: 12px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }

    .chat-input-area input {
        flex: 1;
        min-width: 0; /* Prevents input from overflowing */
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .chat-input-area button {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .chat-message {
        max-width: 85%;
    }

    .chat-message .message-content {
        font-size: 0.95rem;
        padding: 10px 14px;
    }

    /* Make welcome message more prominent */
    .chat-message.assistant:first-child .message-content {
        background: white;
        border: 2px solid var(--primary-color);
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
    }
}

/* Hide chatbot on login/marketing pages */
.no-sidebar #chat-widget {
    display: none;
}

/* --- NOTIFICATION CENTRE --- */
/* notif-bar removed - bell is now fixed-position */

.notif-bell-wrapper {
    position: relative;
}

/* Mobile notification bell in header */
.mobile-notif-bell .notif-bell-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    color: var(--text-main);
}
.mobile-notif-bell .notif-bell-btn:hover {
    background: transparent;
}
.mobile-notif-bell .notif-panel {
    right: -60px;
}

.notif-bell-btn {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: all 0.2s;
    position: relative;
}

.notif-bell-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: #f5f3ff;
}

.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    line-height: 1;
    border: 2px solid var(--bg-light);
}

.notif-panel {
    position: absolute;
    top: 50px;
    right: 0;
    width: 380px;
    max-height: 0;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 1055;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.notif-panel.open {
    max-height: 480px;
    opacity: 1;
}

.notif-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: #fafbfc;
}

.notif-panel-header strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.notif-mark-all-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.notif-mark-all-btn:hover {
    background: #f5f3ff;
}

.notif-panel-body {
    max-height: 400px;
    overflow-y: auto;
}

.notif-panel-body::-webkit-scrollbar {
    width: 5px;
}
.notif-panel-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.notif-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.notif-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.4;
}

.notif-empty p {
    margin: 0;
    font-size: 0.85rem;
}

.notif-item {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

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

.notif-item:hover {
    background: #f8fafc;
}

.notif-item-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: inherit;
}

.notif-item.notif-unread {
    background: #f0f0ff;
}

.notif-item.notif-unread:hover {
    background: #e8e8ff;
}

.notif-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
    font-size: 0.85rem;
}

.notif-item.notif-unread .notif-item-icon {
    background: var(--primary-color);
    color: white;
}

.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 2px;
}

.notif-item-message {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Notification Centre Mobile */
@media (max-width: 768px) {
    .notif-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 0;
    }

    .notif-panel.open {
        max-height: 70vh;
    }

    /* notif-bar removed */
}

/* --- UMBRELLA TICKETS / SUBTASK BADGES --- */
.bg-purple {
    background-color: #8b5cf6 !important;
}