/* 
  Sleek Dark Mode & Neon Accent Styling for ReservBot Manager Dashboard
*/

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);
    
    /* Sleek Dark Palette */
    --color-bg-darkest: #07090e;
    --color-bg-main: #0b0f19;
    --color-bg-card: rgba(17, 24, 39, 0.7);
    --color-border: rgba(255, 255, 255, 0.08);
    
    /* Neon Accents */
    --color-primary: #8b5cf6; /* Neon Violet */
    --color-primary-hover: #7c3aed;
    --color-secondary: #6366f1; /* Neon Indigo */
    --color-success: #10b981; /* Neon Emerald */
    --color-warning: #f59e0b; /* Amber */
    --color-danger: #ef4444; /* Neon Coral */
    --color-info: #3b82f6; /* Blue */
    
    /* Text colors */
    --color-text-white: #f3f4f6;
    --color-text-muted: #9ca3af;
    --color-text-dark: #1f2937;
    
    /* Grid & Spacing */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-darkest);
    background-image: 
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--color-text-white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glassmorphism Common Styles */
.glass-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-radius: var(--radius-md);
}

.hidden {
    display: none !important;
}

/* Utility Animations */
.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

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

/* 1. Auth Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    width: 100%;
    max-width: 440px;
    padding: 40px;
    text-align: center;
}

.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.logo-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.logo-icon i {
    width: 32px;
    height: 32px;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.modal-header p {
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 32px;
}

.input-group {
    text-align: left;
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    width: 18px;
    height: 18px;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 15px;
    transition: var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

.error-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-danger);
    font-size: 13px;
    margin-bottom: 20px;
    text-align: left;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.error-msg i {
    width: 16px;
    height: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

/* 2. Main Layout */
.app-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    height: 100%;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
    border-left: none;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.sidebar-header {
    margin-bottom: 40px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.brand-logo i {
    width: 22px;
    height: 22px;
}

.brand-name h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.brand-name span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: var(--transition);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.nav-item.active {
    color: #fff;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

.badge-submitted {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.manager-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text-muted);
}

.avatar i {
    width: 16px;
    height: 16px;
}

.profile-info h4 {
    font-size: 14px;
    font-weight: 600;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.status-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-indicator.online {
    color: var(--color-success);
}

.status-indicator.online::before {
    background-color: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
}

.logout-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.logout-btn:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
}

.logout-btn i {
    width: 18px;
    height: 18px;
}

/* Main Content Area */
.main-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100vh;
    overflow-y: auto;
}

/* Navbar Styling */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    position: relative;
    z-index: 1000;
}

.navbar h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.5px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar {
    position: relative;
    width: 320px;
}

.search-bar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    width: 16px;
    height: 16px;
}

.search-bar input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.04);
}

.notification-bell {
    position: relative;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.notification-bell:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notification-bell i {
    width: 18px;
    height: 18px;
}

.pulse-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background-color: var(--color-danger);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-danger);
}

/* Notification Dropdown Container */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    width: 360px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: none;
    flex-direction: column;
    z-index: 1100;
    overflow: hidden;
    cursor: default;
    animation: dropdown-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-dropdown.active {
    display: flex;
}

.dropdown-header {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--color-text);
}

.dropdown-body {
    max-height: 480px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.dropdown-item-title {
    font-weight: 700;
    font-size: 12px;
    color: var(--color-primary-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-item-title .item-badge {
    background: var(--color-danger);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
}

.dropdown-item-text {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-placeholder {
    padding: 24px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 13px;
}

.unread-count-badge {
    background: var(--color-danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

@keyframes dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tab Panes */
.tab-pane {
    display: none;
    flex-direction: column;
    gap: 24px;
}

.tab-pane.active {
    display: flex;
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
}

.stat-icon i {
    width: 24px;
    height: 24px;
}

.icon-purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--color-primary);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.icon-yellow {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.icon-green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-info);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.stat-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 26px;
    margin-top: 4px;
}

/* Split Section on Dashboard */
.dashboard-split {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

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

.card-header h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 18px;
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Modern Data Table Styling */
.table-container {
    overflow-x: auto;
    padding: 8px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    padding: 16px 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--color-border);
}

.data-table td {
    padding: 16px 20px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.data-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.status-pill {
    display: inline-flex;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: capitalize;
}

.status-submitted {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
}

.status-in-progress,
.status-in_progress {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-info);
    border: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.15);
}

.status-waiting {
    background: rgba(139, 92, 246, 0.15);
    color: var(--color-primary);
    border: 1px solid rgba(139, 92, 246, 0.25);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.15);
}

.status-completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.15);
}

/* Chat Box Area */
.chat-container {
    height: 700px;
    display: flex;
    flex-direction: column;
}

.chat-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    height: 100%;
    color: var(--color-text-muted);
    text-align: center;
    padding: 40px;
}

.chat-placeholder i {
    width: 48px;
    height: 48px;
    opacity: 0.3;
}

.chat-box {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

.chat-msg p {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-msg-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.chat-msg:hover .chat-msg-copy-btn {
    opacity: 1;
}

.chat-msg-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.doc-attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-text-white) !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s;
}

.doc-attachment-link:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Light Theme overrides */
.light-theme .chat-msg-copy-btn {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.1);
    color: rgba(15, 23, 42, 0.6);
}

.light-theme .chat-msg-copy-btn:hover {
    background: rgba(15, 23, 42, 0.1);
    color: var(--color-primary);
}

.light-theme .doc-attachment-link {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
    color: var(--color-text) !important;
}

.light-theme .doc-attachment-link:hover {
    background: rgba(15, 23, 42, 0.08) !important;
    border-color: rgba(15, 23, 42, 0.16);
}

.chat-video-attachment {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-video-attachment video {
    border: 1px solid rgba(255, 255, 255, 0.1);
    outline: none;
}

.chat-video-attachment video:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}


.chat-msg-client {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: var(--color-text-white);
}

.chat-msg-manager {
    align-self: flex-end;
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.2);
}

.chat-msg-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    display: block;
    margin-top: 6px;
    text-align: right;
}

.chat-input-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--color-border);
}

.chat-input-area textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    resize: none;
    min-height: 48px;
    max-height: 140px;
    line-height: 1.5;
    font-family: inherit;
    overflow-y: auto;
}

.chat-input-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.chat-input-actions-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

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


.btn-chat-attach {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-chat-attach:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: var(--neon-glow);
}

/* Template Popover Styles */
.btn-chat-template:hover {
    background: rgba(139, 92, 246, 0.15) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
    box-shadow: var(--neon-glow);
}

.template-popover {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 60px;
    width: 340px;
    max-height: 380px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(139, 92, 246, 0.15);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: dropdown-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.template-popover.hidden {
    display: none !important;
}

.template-popover-header {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text);
}

.template-popover-list {
    overflow-y: auto;
    max-height: 320px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.template-popover-item {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.template-popover-item:hover {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

.template-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary-light);
}

.template-item-text {
    font-size: 12px;
    color: var(--color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.light-theme .template-popover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.light-theme .template-popover-item {
    background: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.06);
}

.light-theme .template-popover-item:hover {
    background: rgba(139, 92, 246, 0.08);
}


.chat-input-preview-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(139, 92, 246, 0.05);
    border-top: 1px dashed rgba(139, 92, 246, 0.2);
    border-bottom: 1px dashed rgba(139, 92, 246, 0.05);
}

.chat-input-preview-area.hidden {
    display: none !important;
}

.preview-thumbnail-container {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
}

.preview-remove-btn:hover {
    background: #ef4444;
}

.preview-filename {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-primary);
}

/* Claims List Filters */
.filter-bar {
    padding: 20px 24px;
    position: relative !important;
    z-index: 100 !important;
}

.filters {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 500;
    text-transform: uppercase;
}

.filter-group select {
    padding: 10px 16px;
    background: #0b0f19;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: #fff;
    min-width: 200px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Global select option styling for sleek dark mode dropdowns */
select option {
    background-color: #0b0f19;
    color: #fff;
}

/* Operators Layout */
.operators-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 6px;
}

.operators-add-card .card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 8px 16px;
    font-size: 13px;
}

.btn-danger:hover {
    background: var(--color-danger);
    color: #fff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Chat Claim Info Panel */
.chat-claim-info-panel {
    background: rgba(255, 255, 255, 0.015);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition);
}

.chat-claim-info-panel.collapsed .claim-details-grid,
.chat-claim-info-panel.collapsed .claim-reason-box,
.chat-claim-info-panel.collapsed .claim-photos-row {
    display: none !important;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-toggle-btn {
    background: transparent;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.claim-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    font-size: 13px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    color: var(--color-text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-val {
    font-weight: 500;
    color: var(--color-text-white);
}

.claim-reason-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #e5e7eb;
}

/* Photo Gallery styling */
.claim-photos-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.claim-photo-thumbnail {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.claim-photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.claim-photo-thumbnail:hover {
    transform: scale(1.08);
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

/* Collapsible claim details styling */
.panel-status-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-status-select {
    padding: 6px 12px;
    background: rgba(11, 15, 25, 0.9);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.panel-status-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.2);
}

/* Lightbox modal for photos */
/* Custom premium Lightbox styles */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    user-select: none;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 85%;
    max-height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    border: 2px solid var(--color-border);
    transition: transform 0.3s ease;
}

.lightbox-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 10100;
}

.lightbox-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.lightbox-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: var(--neon-glow);
}

.lightbox-btn.close-btn {
    padding: 8px;
    aspect-ratio: 1;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10100;
    transition: var(--transition);
}

.lightbox-arrow:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: var(--neon-glow);
    transform: translateY(-50%) scale(1.1);
}

.prev-arrow {
    left: 40px;
}

.next-arrow {
    right: 40px;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Premium Sortable Column Headers */
th.sortable {
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    position: relative;
    padding-right: 28px !important;
}

th.sortable:hover {
    color: var(--color-primary-light) !important;
    background: rgba(139, 92, 246, 0.05) !important;
}

.sort-icon {
    width: 14px;
    height: 14px;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
    transition: var(--transition);
}

th.sortable:hover .sort-icon {
    opacity: 1;
    color: var(--color-primary-light);
}

th.sortable.active .sort-icon {
    opacity: 1;
    color: var(--color-primary-light);
}

/* Expanded active chat height for better visuals */
.chat-container {
    height: 1100px;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10500;
}

.toast-notification {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    min-width: 320px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--color-text);
    cursor: pointer;
    animation: toast-slide-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
}

.toast-notification:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 12px 30px -5px rgba(139, 92, 246, 0.2), 0 8px 15px -6px rgba(139, 92, 246, 0.2);
}

.toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--color-primary-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-time {
    font-size: 11px;
    color: var(--color-text-muted);
}

.toast-body {
    font-size: 13px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
}

.toast-close:hover {
    color: var(--color-danger);
}

/* Unread message badge */
.unread-badge {
    background: var(--color-danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
    animation: badge-pulse 2s infinite;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%) translateY(0);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

@keyframes badge-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Unread chat messages indicator inside chat window */
.chat-msg-unread.chat-msg-client {
    border-left: 3px solid var(--color-danger) !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.1);
}

.unread-msg-badge {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid rgba(239, 68, 68, 0.25);
    letter-spacing: 0.5px;
}

/* Theme Toggle Button Style */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-white);
    transition: var(--transition);
    padding: 0;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.theme-toggle-btn i {
    width: 18px;
    height: 18px;
}

/* =============================================================================
   Light Theme styling overrides
   ============================================================================= */
.light-theme {
    /* Sleek Light Palette */
    --color-bg-darkest: #f1f5f9; /* Slate 100 */
    --color-bg-main: #f8fafc; /* Slate 50 */
    --color-bg-card: rgba(255, 255, 255, 0.82); /* Glass White */
    --color-border: rgba(15, 23, 42, 0.08); /* Soft slate border */
    
    /* Elegant Light Accents */
    --color-primary: #7c3aed; /* Rich Violet */
    --color-primary-hover: #6d28d9;
    --color-secondary: #4f46e5; /* Indigo */
    
    /* Text overrides */
    --color-text-white: #0f172a; /* Slate 900 */
    --color-text-muted: #475569; /* Slate 600 */
}

/* Background image overrides for light mode radial gradients */
.light-theme body {
    background-image: 
        radial-gradient(at 0% 0%, rgba(124, 58, 237, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(79, 70, 229, 0.05) 0px, transparent 50%);
}

/* Light glass cards soft shadows */
.light-theme .glass-card {
    box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* Force dark text & high-contrast borders for all input controls in light mode */
.light-theme input,
.light-theme select,
.light-theme textarea {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

/* High-contrast border and background for reason boxes and specific inputs */
.light-theme .claim-reason-box,
.light-theme .search-bar input,
.light-theme .chat-input-area textarea,
.light-theme .input-wrapper input {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

.light-theme input::placeholder,
.light-theme textarea::placeholder {
    color: #94a3b8 !important; /* Slate 400 */
}

.light-theme input:focus,
.light-theme select:focus,
.light-theme textarea:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12) !important;
}

/* Notification Popover override for Light Theme */
.light-theme .notification-dropdown {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.light-theme .dropdown-header {
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

.light-theme .dropdown-item {
    border-bottom-color: rgba(15, 23, 42, 0.05);
}

.light-theme .dropdown-item:hover {
    background: rgba(124, 58, 237, 0.05);
}

/* Theme Toggle Button icon toggling */
.theme-toggle-btn .moon-icon {
    display: none;
}
.theme-toggle-btn .sun-icon {
    display: block;
}

.light-theme .theme-toggle-btn .sun-icon {
    display: none;
}
.light-theme .theme-toggle-btn .moon-icon {
    display: block;
}

/* Specific styling for scrollbar in light mode */
.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
}

.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.25);
}

/* Chat styles for light mode */
.light-theme .chat-msg-manager {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #ffffff !important; /* Keep manager text white for readability on violet gradient */
}

.light-theme .chat-msg-client {
    background: rgba(15, 23, 42, 0.04);
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.light-theme .chat-msg-unread.chat-msg-client {
    border-left: 3px solid var(--color-danger) !important;
    background: rgba(239, 68, 68, 0.04);
}

.light-theme .chat-msg-client .chat-msg-meta {
    color: rgba(15, 23, 42, 0.5) !important;
}

.light-theme .chat-msg-manager .chat-msg-meta {
    color: rgba(255, 255, 255, 0.6) !important;
}

.light-theme .btn-chat-attach {
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    color: #475569 !important;
}

.light-theme .btn-chat-attach:hover {
    background: rgba(15, 23, 42, 0.08) !important;
    color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.15) !important;
}

/* Tab active & hover styles */
.light-theme .nav-item:hover {
    color: var(--color-primary) !important;
    background: rgba(124, 58, 237, 0.06) !important;
}

.light-theme .nav-item.active {
    background: rgba(124, 58, 237, 0.08);
    color: var(--color-primary);
}

/* Table styling fixes for light mode */
.light-theme th {
    background: rgba(15, 23, 42, 0.03);
    color: #475569;
}

.light-theme tr {
    border-bottom-color: rgba(15, 23, 42, 0.05);
}

.light-theme tr:hover {
    background: rgba(15, 23, 42, 0.015);
}

/* Status pills overrides in light mode with beautiful saturated glow halos */
.light-theme .status-pill {
    border-width: 1px;
    border-style: solid;
    font-weight: 700;
}

.light-theme .status-pill.status-submitted {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #b45309 !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3) !important;
}

.light-theme .status-pill.status-in_progress,
.light-theme .status-pill.status-in-progress {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #1d4ed8 !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3) !important;
}

.light-theme .status-pill.status-waiting {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #6d28d9 !important;
    border-color: rgba(139, 92, 246, 0.5) !important;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3) !important;
}

.light-theme .status-pill.status-completed {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #047857 !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3) !important;
}

.light-theme .status-pill.status-archived {
    background: rgba(148, 163, 184, 0.2) !important;
    color: #475569 !important;
    border-color: rgba(148, 163, 184, 0.5) !important;
    box-shadow: 0 0 10px rgba(148, 163, 184, 0.2) !important;
}

/* Saturated active status filter buttons halos in light theme */
.light-theme .status-btn-pill.active {
    border-width: 1px;
}

.light-theme .status-btn-pill[data-status="submitted"].active {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #b45309 !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3) !important;
}

.light-theme .status-btn-pill[data-status="in_progress"].active {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #1d4ed8 !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3) !important;
}

.light-theme .status-btn-pill[data-status="waiting"].active {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #6d28d9 !important;
    border-color: rgba(139, 92, 246, 0.5) !important;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3) !important;
}

.light-theme .status-btn-pill[data-status="completed"].active {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #047857 !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3) !important;
}

.light-theme .status-btn-pill[data-status="archived"].active {
    background: rgba(148, 163, 184, 0.2) !important;
    color: #475569 !important;
    border-color: rgba(148, 163, 184, 0.5) !important;
    box-shadow: 0 0 12px rgba(148, 163, 184, 0.2) !important;
}

/* Modals background overrides in light mode */
.light-theme .modal-overlay {
    background: rgba(15, 23, 42, 0.4);
}

/* Day Separator in Chat */
.chat-day-separator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    position: relative;
    width: 100%;
}

.chat-day-separator::before {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
    z-index: 1;
}

.chat-day-separator span {
    background: #0f172a;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    z-index: 2;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.5px;
}

.light-theme .chat-day-separator span {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Status Filter Tag Pills */
.status-checkbox-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.status-btn-pill {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--color-text-muted);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    outline: none;
}

.light-theme .status-btn-pill {
    background: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.08);
}

.status-btn-pill:hover {
    border-color: var(--color-primary);
    color: var(--color-text-white);
}

.light-theme .status-btn-pill:hover {
    color: var(--color-text-dark);
}

.status-btn-pill.active {
    background: rgba(139, 92, 246, 0.15);
    color: var(--color-primary);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

/* Status-specific active tag pill styling matching dashboard color system */
.status-btn-pill[data-status="submitted"].active {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.status-btn-pill[data-status="in_progress"].active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-info);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.status-btn-pill[data-status="waiting"].active {
    background: rgba(139, 92, 246, 0.15);
    color: var(--color-primary);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
}

.status-btn-pill[data-status="completed"].active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.status-archived {
    background: rgba(148, 163, 184, 0.15);
    color: var(--color-text-muted);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.light-theme .status-pill.status-archived {
    background: rgba(148, 163, 184, 0.15);
    color: #64748b;
}

.status-btn-pill[data-status="archived"].active {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.4);
    box-shadow: 0 0 12px rgba(148, 163, 184, 0.15);
}

/* Premium secondary button styling */
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: var(--color-text-white);
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-primary);
    box-shadow: var(--neon-glow);
    color: #fff;
}

.light-theme .btn-secondary {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

.light-theme .btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Premium custom multi-select dropdown */
.custom-multiselect {
    position: relative;
    user-select: none;
    font-family: var(--font-primary);
    z-index: 101 !important;
}

.custom-multiselect.open {
    z-index: 102 !important;
}

.multiselect-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #0b0f19;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: pointer;
    min-width: 220px;
    font-size: 13px;
    height: 40px;
    transition: var(--transition);
}

.multiselect-trigger:hover {
    border-color: var(--color-primary);
}

.trigger-icon {
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
    transition: transform 0.2s ease;
}

.custom-multiselect.open .trigger-icon {
    transform: rotate(180deg);
}

.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #0b0f19;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 99999 !important;
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.multiselect-dropdown.hidden {
    display: none !important;
}

.multiselect-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.multiselect-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.multiselect-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    background: transparent;
    cursor: pointer;
    accent-color: var(--color-primary);
}

/* Light theme support */
.light-theme .multiselect-trigger {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

.light-theme .multiselect-dropdown {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.light-theme .multiselect-item {
    color: #475569;
}

.light-theme .multiselect-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Sleek premium date input styling */
.date-range-container {
    display: flex;
    align-items: center;
    background: #0b0f19;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 2px 12px;
    height: 40px;
    min-width: 320px;
    transition: var(--transition);
}

.date-range-container:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

.date-range-input {
    border: none !important;
    background: transparent !important;
    color: #fff !important;
    font-family: var(--font-primary);
    font-size: 13px;
    padding: 6px 8px !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    width: 125px;
}

.date-range-separator {
    color: var(--color-text-muted);
    font-size: 12px;
    padding: 0 4px;
    user-select: none;
}

.date-range-icon {
    color: rgba(255, 255, 255, 0.6) !important;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    display: flex;
    align-items: center;
}

.date-range-icon svg {
    stroke: rgba(255, 255, 255, 0.7) !important; /* Lighter white for supreme visibility */
}

.date-range-input::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.7) !important; /* Forces native browser calendar icon to be beautiful white in dark theme! */
    cursor: pointer;
}

.light-theme .date-range-container {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
}

.light-theme .date-range-input {
    color: #0f172a !important;
}

.light-theme .date-range-input::-webkit-calendar-picker-indicator {
    filter: none !important;
}

.light-theme .date-range-icon {
    color: #64748b !important;
}

.light-theme .date-range-icon svg {
    stroke: #64748b !important;
}

/* Premium Notification Sectioning (New claims & Messages blocks) */
.notification-section {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--color-border);
}

.notification-section:last-child {
    border-bottom: none;
}

.section-title {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.section-icon {
    width: 14px;
    height: 14px;
}

.section-icon.text-purple {
    stroke: var(--color-primary-light) !important;
}

.section-icon.text-green {
    stroke: var(--color-success) !important;
}

.section-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}

.section-badge.badge-submitted {
    background: rgba(139, 92, 246, 0.15);
    color: var(--color-primary-light);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.section-badge.badge-unread {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.item-factory-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
}

.dropdown-item-placeholder {
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--color-text-muted);
    opacity: 0.6;
}

.new-claim-item:hover {
    background: rgba(139, 92, 246, 0.03);
}

.unread-msg-item:hover {
    background: rgba(16, 185, 129, 0.03);
}

/* Premium Statistics Styles */
.stats-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--color-border);
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.stats-presets {
    display: flex;
    gap: 8px;
}

.stats-preset-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: var(--transition);
}

.stats-preset-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-white);
}

.stats-preset-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff !important;
    box-shadow: var(--neon-glow);
}

.stats-custom-range {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* KPI Card & Layout Enhancements */
.kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 12px 20px -10px rgba(0,0,0,0.4);
}

.stats-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.stats-row:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.stats-row-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}

.stats-row-name {
    color: var(--color-text-white);
}

.stats-row-val {
    color: var(--color-primary-light);
    font-weight: 700;
}

.stats-progress-bg {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.stats-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    box-shadow: 0 0 8px var(--color-primary);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stats-progress-fill.green {
    background: linear-gradient(90deg, #10b981, #34d399);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* Light Theme overrides for stats */
.light-theme .stats-preset-btn {
    color: #475569;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.light-theme .stats-preset-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.light-theme .stats-preset-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff !important;
}

.light-theme .stats-filter-bar {
    background: #ffffff;
    border-color: #cbd5e1;
}

.light-theme .stats-row {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.light-theme .stats-row:hover {
    background: #f1f5f9;
}

.light-theme .stats-progress-bg {
    background: #e2e8f0;
}

.light-theme .stats-row-name {
    color: #0f172a;
}

.light-theme .kpi-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

.light-theme .kpi-value {
    color: #0f172a !important;
}

.light-theme .stats-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

.light-theme .stats-card h3 {
    color: #0f172a !important;
}

/* =============================================================================
   Chat Replies & New Features
   ============================================================================= */

/* Chat reply preview area */
.chat-reply-preview-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(99, 102, 241, 0.08);
    border-top: 1px solid var(--color-border);
    animation: slideDown 0.2s ease-out;
}

.reply-preview-content {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 85%;
}

.light-theme .reply-preview-content {
    color: #0f172a;
}

.reply-preview-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chat message reply quote container inside bubble */
.chat-msg-reply-quote {
    background: rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--color-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.2s ease;
}
.chat-msg-reply-quote:hover {
    background: rgba(255, 255, 255, 0.15);
}

.light-theme .chat-msg-reply-quote {
    background: rgba(0, 0, 0, 0.05);
    color: #475569;
}
.light-theme .chat-msg-reply-quote:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Reply action button next to message */
.chat-msg-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
    display: inline-flex;
    gap: 6px;
    margin-left: 8px;
    vertical-align: middle;
}
.chat-message-item:hover .chat-msg-actions {
    opacity: 1;
}

.btn-msg-action {
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s ease;
    padding: 2px;
}
.btn-msg-action:hover {
    color: #fff;
}
.light-theme .btn-msg-action:hover {
    color: #000;
}

/* Highlight flash animation when clicking quotes */
@keyframes highlight-flash {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.8);
        background-color: rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(99, 102, 241, 0.5);
        background-color: rgba(99, 102, 241, 0.3);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
        background-color: transparent;
    }
}
.highlight-flash {
    animation: highlight-flash 1.5s ease-out;
    border-radius: var(--radius-sm);
}

/* Slide down animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================================================
   RESPONSIVE & ADAPTIVE STYLES (PC & MOBILE)
   ============================================================================= */

/* Mobile elements hidden by default on PC */
.mobile-menu-btn {
    display: none !important;
}

.sidebar-overlay {
    display: none !important;
}

.mobile-chat-inline-btn {
    display: none !important;
}

/* Ensure tab pane and main content always stretch 100% width */
.tab-pane {
    width: 100%;
}

.main-content {
    width: 100%;
    min-width: 0;
}

/* Mobile Screens ONLY (< 992px) */
@media (max-width: 991px) {
    .app-layout {
        display: block;
        height: 100vh;
        overflow: hidden;
        position: relative;
    }

    .mobile-menu-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        color: #fff;
        cursor: pointer;
        margin-right: 10px;
        transition: var(--transition);
    }
    .mobile-menu-btn:hover {
        background: rgba(139, 92, 246, 0.2);
        border-color: rgba(139, 92, 246, 0.4);
    }
    .mobile-menu-btn i {
        width: 20px;
        height: 20px;
    }

    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 270px !important;
        height: 100vh !important;
        z-index: 9999 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 8px 0 25px rgba(0, 0, 0, 0.7) !important;
        background: var(--color-bg-darkest) !important;
    }
    .sidebar.active {
        transform: translateX(0) !important;
    }

    .sidebar-overlay {
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.7) !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        z-index: 9998 !important;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease !important;
    }
    .sidebar-overlay.active {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .main-content {
        padding: 14px;
        gap: 16px;
        height: 100vh;
        overflow-y: auto;
    }

    .navbar {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .navbar-left {
        display: flex;
        align-items: center;
    }

    .navbar-right {
        gap: 10px;
    }

    .search-bar {
        width: 100%;
        margin-top: 4px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stats-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stats-ranking-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .templates-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .filter-bar {
        padding: 12px;
    }

    .filters {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .filter-group {
        width: 100%;
        min-width: 0 !important;
    }

    .status-checkbox-group {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .status-btn-pill {
        padding: 6px 10px;
        font-size: 12px;
        flex: 1 1 auto;
        text-align: center;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-sm);
    }

    .data-table {
        min-width: 650px;
    }

    .data-table th, .data-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .mobile-chat-inline-btn {
        display: inline-flex !important;
    }

    .data-table tr {
        transition: background 0.15s ease;
    }
    .data-table tr:hover, .data-table tr:active {
        background: rgba(139, 92, 246, 0.12) !important;
    }

    .data-table td:last-child, .data-table th:last-child {
        position: sticky;
        right: 0;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(8px);
        box-shadow: -6px 0 12px rgba(0, 0, 0, 0.4);
        z-index: 2;
    }

    .chat-container {
        height: calc(100vh - 120px);
    }

    #chat-template-popover {
        position: fixed;
        bottom: 75px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: 100%;
        max-height: 55vh;
        z-index: 10050;
    }

    .notification-dropdown {
        position: fixed;
        top: 65px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: 100%;
        z-index: 10050;
    }
}

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

    .stats-kpi-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 12px 14px;
        gap: 12px;
    }

    .stat-value {
        font-size: 20px;
    }

    .modal-content {
        padding: 24px 16px;
        max-width: 92%;
    }
}


