@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;600;700&display=swap');

/* Leaflet Map - Prevent global CSS conflicts */
.leaflet-container * {
    box-sizing: content-box;
}

:root {
    --primary-color: #af0925;
    --primary-dark: #6a0f0b;
    --primary-gradient: linear-gradient(135deg, #af0925 0%, #7a0618 50%, #580713 100%);
    --primary-50: #fef2f2;
    --primary-100: #fee2e2;
    --primary-300: #fca5a5;
    --primary-600: #dc2626;
    --success-color: #29b35f;
    --warning-color: #fadc00;
    --danger-color: #af0925;
    --info-color: #2a739e;
    --navy-900: #0f172a;
    --navy-800: #1e293b;
    --navy-700: #334155;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #d5d6d7;
    --gray-300: #d1d5db;
    --gray-400: #7a7b7a;
    --gray-500: #575d5e;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --surface-bg: #ffffff;
    --surface-card: #ffffff;
    
    /* Design System Tokens */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    
    --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 4px 12px rgba(15, 23, 42, 0.12);
    
    --font-xs: 0.7rem;
    --font-sm: 0.78rem;
    --font-base: 0.85rem;
    --font-md: 0.95rem;
    --font-lg: 1.1rem;
}

/* Portal Design System - Shared Components */
.page-container {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-card);
}

.portal-card {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-card);
}

.portal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.portal-card-header h1,
.portal-card-header h2,
.portal-card-header h3 {
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--navy-800);
    margin: 0;
}

.portal-card-header .subtitle {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 2px;
}

.portal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--gray-200);
}

.portal-tab {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-600);
}

.portal-tab:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

.portal-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--spacing-md);
}

.portal-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--gray-800);
    transition: all 0.15s ease;
    text-align: center;
}

.portal-tile:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(175, 9, 37, 0.1);
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-base);
}

.portal-table th,
.portal-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
}

.portal-table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--gray-600);
}

.portal-table tr:hover {
    background: var(--gray-50);
}

.portal-filters {
    background: var(--surface-card);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.portal-filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    align-items: flex-end;
}

.portal-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.portal-filter-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: var(--spacing-xs);
}

.portal-filter-group select,
.portal-filter-group input {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: var(--font-base);
    height: 34px;
}

/* Standardized Badge Sizes */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-neutral { background: var(--gray-100); color: var(--gray-600); }

.collapsible-section {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 12px;
    overflow: visible;
}

.collapsible-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    transition: background 0.2s;
}

.collapsible-section .section-header:hover {
    background: var(--gray-100);
}

.collapsible-section .section-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--navy-800);
}

.collapse-icon {
    transition: transform 0.3s ease;
}

.collapsible-section.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.collapsible-section.collapsed .section-content {
    display: none;
}

.collapsible-section .section-content {
    padding: var(--spacing-md);
    overflow: visible;
}

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

html {
    font-size: 14px;
    border: none;
}

body {
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--surface-bg);
    color: var(--gray-800);
    line-height: 1.5;
    border: none;
    margin: 0;
    padding: 0;
}

nav, nav.navbar {
    border: none !important;
    outline: none !important;
}

.container {
    max-width: 3600px;
    margin: 0 auto;
    padding: 12px 16px;
}

/* Demo Mode Banner */
.demo-banner {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.85rem;
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
.demo-banner svg { flex-shrink: 0; }
body:has(.demo-banner) .sidebar { top: 92px !important; }
body:has(.demo-banner) .main-content { padding-top: 40px; }

/* Header */
.navbar {
    background: white;
    color: var(--gray-800);
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 52px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 32px;
    width: auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-left: 10px;
}

.tagline {
    font-style: italic;
    color: var(--gray-500);
    font-size: 0.925rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-tagline {
    font-style: italic;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-right: 8px;
}

/* Header user info */
.nav-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-user {
    color: var(--gray-600);
    font-size: 0.85rem;
}

.btn-logout {
    color: var(--gray-600);
    padding: 5px 12px;
    border-radius: 4px;
    background: var(--gray-100);
    font-weight: 500;
    font-size: 0.8rem;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-logout:hover {
    color: var(--gray-800);
    background: var(--gray-200);
    border-color: var(--gray-300);
}

/* Sidebar Navigation - Fixed */
.sidebar {
    position: fixed;
    left: 0;
    top: 52px;
    width: 180px;
    height: calc(100vh - 52px);
    background: var(--navy-900);
    padding: 10px 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 0 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 6px;
    white-space: nowrap;
    min-height: 30px;
    pointer-events: auto;
    cursor: pointer;
    position: relative;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-link.active {
    background: var(--primary-color);
    color: white;
}

.sidebar-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sidebar-label {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 1;
    visibility: visible;
}

.chat-unread-badge {
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
}

#sidebar-notification-badge,
#sidebar-chat-badge,
#helpdesk-chat-badge {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1 !important;
    visibility: visible !important;
}

.status-badge.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-badge.status-closed {
    background: #f3f4f6;
    color: #6b7280;
}

.helpdesk-session-item.closed {
    opacity: 0.6;
}

.chat-closed-notice {
    padding: 16px;
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
    background: var(--gray-50);
}

.chat-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 360px;
    z-index: 10000;
    cursor: pointer;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.chat-toast-content {
    flex: 1;
}

.chat-toast-content strong {
    display: block;
    font-size: 0.9rem;
    color: var(--navy-800);
    margin-bottom: 4px;
}

.chat-toast-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.chat-toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.chat-toast-close:hover {
    color: var(--gray-600);
}

.container.with-sidebar {
    margin-left: 180px;
    max-width: calc(3600px - 180px);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .tagline {
        display: none;
    }
    
    .nav-user {
        display: none;
    }
}

.alert {
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background-color: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    min-height: 34px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background-color: var(--gray-300);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.75rem;
    height: 28px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.btn-full {
    width: 100%;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 8px;
    color: var(--gray-800);
}

.login-logo {
    display: block;
    margin: 0 auto 20px;
    max-width: 200px;
    height: auto;
}

.login-tagline {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-style: italic;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.login-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.dashboard-welcome {
    text-align: center;
    margin-bottom: 16px;
}

.welcome-tagline {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.test-credentials {
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

.test-credentials p {
    margin: 4px 0;
    color: var(--gray-600);
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 3px;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.9rem;
    min-height: 36px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--gray-500);
    font-size: 0.75rem;
}

.dashboard h1 {
    margin-bottom: var(--spacing-lg);
    color: var(--navy-800);
    font-weight: 600;
    font-size: 1.1rem;
}

.filters-panel {
    background: var(--surface-card);
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    align-items: end;
}

.filter-group {
    width: 100%;
}

.filter-group label {
    display: block;
    margin-bottom: 2px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
}

.filter-group select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--gray-300);
    font-size: 0.8rem;
    border-radius: 4px;
    height: 32px;
}

.filter-group .searchable-display {
    height: 32px;
    padding: 6px 8px;
    font-size: 0.8rem;
}

.filters-form-planned {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr 1fr auto;
    gap: var(--spacing-md);
    align-items: end;
}

.filters-form-calendar {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr auto;
    gap: var(--spacing-md);
    align-items: end;
}

.filter-wide {
    min-width: 200px;
}

.filter-narrow {
    min-width: 120px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 14px;
}

.summary-card {
    background: var(--surface-card);
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.summary-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.summary-label {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.text-info { color: var(--info-color); }

.calendar-section {
    background: var(--surface-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 1;
}

.calendar-section h2 {
    margin-bottom: var(--spacing-lg);
    color: var(--navy-800);
    font-weight: 600;
    font-size: var(--font-lg);
}

.status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-lg);
    position: sticky;
    top: 44px;
    z-index: 100;
    background: var(--gray-50);
    border-radius: 0;
    margin-left: calc(-1 * var(--spacing-lg));
    margin-right: calc(-1 * var(--spacing-lg));
    border-bottom: 1px solid var(--gray-200);
    width: calc(100% + 2 * var(--spacing-lg));
    box-sizing: border-box;
}

.status-legend.compact {
    gap: var(--spacing-sm);
    padding: 6px var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-sm);
    color: var(--gray-600);
}

.status-legend.compact .legend-item {
    font-size: 0.7rem;
    gap: 4px;
}

.chip {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.chip-completed_on_time { background-color: var(--success-color); }
.chip-completed_early { background-color: var(--success-color); }
.chip-completed_late { background-color: var(--warning-color); }
.chip-overdue { background-color: var(--danger-color); }
.chip-scheduled { background-color: var(--info-color); }
.chip-unscheduled { 
    background-color: white; 
    color: var(--gray-800) !important; 
    border: 1px solid var(--gray-300);
}
.chip-exempt { 
    background-color: var(--gray-300); 
    color: var(--gray-600) !important; 
    opacity: 0.7;
}

.chip-hatched-remediation {
    background: repeating-linear-gradient(
        45deg,
        #fef3c7,
        #fef3c7 3px,
        #fde68a 3px,
        #fde68a 6px
    );
    border: 1px solid #f59e0b;
}

.chip-declined-remediation {
    position: relative;
    background: #fef2f2;
    border: 1px solid #7f1d1d;
}

.chip-declined-remediation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #dc2626;
    transform: translateY(-50%);
}

.chip-hatched-paperwork {
    background: repeating-linear-gradient(
        -45deg,
        #fef2f2,
        #fef2f2 3px,
        #fecaca 3px,
        #fecaca 6px
    );
    border: 1px solid #dc2626;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px var(--gray-300);
}

.legend-dot.statutory-dot {
    background: var(--primary-color);
}

.legend-dot.remediation-dot {
    background: #f59e0b;
}

.year-header {
    font-size: var(--font-base);
    font-weight: 700;
    color: var(--navy-800);
    text-align: center;
    background-color: var(--gray-100);
    padding: var(--spacing-xs) 0;
}

.stat-badge.pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    transition: background 0.2s;
}

.stat-badge.pdf:hover {
    background: var(--primary-dark);
}

.stat-badge.pdf svg {
    flex-shrink: 0;
}

.stat-badge.pack {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    background: #059669;
    color: white;
    cursor: pointer;
    transition: all 0.15s ease;
}

.stat-badge.pack:hover {
    background: #047857;
}

.year-header-row th {
    border-bottom: 2px solid var(--gray-300);
}

.calendar-table-wrapper {
    overflow-x: auto;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-base);
}

.calendar-table th,
.calendar-table td {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--gray-200);
    text-align: center;
    vertical-align: middle;
    height: 28px;
}

.calendar-table th {
    background-color: var(--gray-50);
    font-weight: 600;
    font-size: var(--font-sm);
    color: var(--gray-600);
}

.discipline-col {
    text-align: left !important;
    min-width: 160px;
    max-width: 200px;
    font-weight: 500;
    font-size: var(--font-sm);
    vertical-align: middle !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: var(--spacing-sm) !important;
}

.frequency-col {
    text-align: center !important;
    min-width: 60px;
    max-width: 80px;
    font-size: var(--font-xs);
    color: var(--navy-700);
    font-weight: 600;
    vertical-align: middle !important;
}

thead .frequency-col {
    font-weight: 700;
    color: var(--navy-800);
}

.calendar-cell {
    min-width: 44px;
    min-height: 22px;
}

.visit-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 3px;
    color: white;
    font-weight: 600;
    font-size: 0.7rem;
    margin: 1px;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.1s;
    white-space: nowrap;
}

.visit-chip:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.no-data {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--gray-500);
}

.page-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.page-header h1 {
    margin: 0;
    color: var(--navy-800);
    font-weight: 600;
    font-size: 1.1rem;
}

.visit-detail .detail-card {
    background: var(--surface-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.detail-header {
    margin-bottom: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-header-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.icon-btn:hover {
    background: var(--gray-50);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.icon-btn-danger:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

.status-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 12px;
    font-weight: 600;
    font-size: var(--font-sm);
    text-transform: capitalize;
}

.status-completed_on_time { background-color: #dcfce7; color: #166534; }
.status-completed_late { background-color: #fef3c7; color: #92400e; }
.status-overdue { background-color: #fee2e2; color: #991b1b; }
.status-scheduled { background-color: #e0f2fe; color: #075985; }
.status-cancelled { background-color: var(--gray-200); color: var(--gray-600); }
.status-active { background-color: #dcfce7; color: #166534; }
.status-inactive { background-color: var(--gray-200); color: var(--gray-600); }
.status-agreed-outside { background-color: #dbeafe; color: #1e40af; }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
}

.detail-item label {
    display: block;
    font-size: var(--font-xs);
    color: var(--gray-500);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.detail-item span {
    font-size: var(--font-base);
    color: var(--gray-800);
}

.detail-notes {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--gray-200);
}

.detail-notes label {
    display: block;
    font-size: var(--font-sm);
    color: var(--gray-500);
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.detail-notes p {
    color: var(--gray-700);
    font-size: var(--font-base);
}

.detail-actions {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.detail-actions .btn {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.documents-section {
    background: var(--surface-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.documents-section h2 {
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--navy-800);
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.document-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
}

.document-item:hover {
    border-color: var(--gray-300);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.document-item.ppm-report {
    border-left: 3px solid var(--primary-color);
    background: linear-gradient(90deg, rgba(175, 9, 37, 0.03) 0%, white 100%);
}

.document-item.remediation-doc {
    border-left: 3px solid #f59e0b;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.03) 0%, white 100%);
}

.document-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.document-item.ppm-report .document-icon {
    background: rgba(175, 9, 37, 0.1);
    color: var(--primary-color);
}

.document-item.remediation-doc .document-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.document-icon svg {
    width: 18px;
    height: 18px;
}

.document-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.document-type-badge {
    display: inline-block;
    padding: 3px var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-sm);
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
}

.document-type-badge.ppm {
    background: var(--primary-color);
    color: white;
}

.document-type-badge.remediation {
    background: #f59e0b;
    color: white;
}

.document-type-badge.quote {
    background: #8b5cf6;
    color: white;
}

.document-item.quote-doc .document-icon {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.document-type {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
}

.document-name {
    font-weight: 500;
}

.document-date {
    font-size: var(--font-sm);
    color: var(--gray-400);
}

.document-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.no-documents {
    color: var(--gray-500);
    font-style: italic;
}

.upload-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--gray-200);
}

.upload-section h3 {
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-md);
    font-weight: 600;
    color: var(--navy-800);
}

.upload-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    align-items: end;
}

.admin-dashboard {
    max-width: 3600px;
    margin: 0 auto;
}

.admin-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg) var(--spacing-md);
    background: var(--surface-card);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--navy-800);
    font-size: var(--font-base);
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
}

.quick-action-btn:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.quick-action-btn svg {
    color: var(--primary-600);
}

.quick-action-btn.warning {
    background: #fffbeb;
    border-color: #fcd34d;
}

.quick-action-btn.warning:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.quick-action-btn.warning svg {
    color: #d97706;
}

.quick-action-btn.secondary {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.quick-action-btn.secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.quick-action-btn.secondary svg {
    color: var(--gray-600);
}

.admin-manage-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.manage-tile {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: 20px;
    background: var(--surface-card);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--navy-800);
    transition: all 0.2s ease;
}

.manage-tile:hover {
    background: var(--gray-50);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.manage-tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.manage-tile:hover .manage-tile-icon {
    background: rgba(175, 9, 37, 0.1);
    color: var(--primary-color);
}

.manage-tile-icon svg {
    color: var(--gray-600);
}

.manage-tile:hover .manage-tile-icon svg {
    color: var(--primary-color);
}

.manage-tile-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.manage-tile-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--navy-800);
}

.manage-tile-count {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.sa-coverage-alert, .sa-coverage-success {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.sa-coverage-alert {
    background: #fef3c7;
    border: 1px solid #f59e0b;
}

.sa-coverage-success {
    background: #d1fae5;
    border: 1px solid #10b981;
}

.sa-coverage-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sa-coverage-icon {
    flex-shrink: 0;
}

.sa-coverage-alert .sa-coverage-icon {
    color: #f59e0b;
}

.sa-coverage-success .sa-coverage-icon {
    color: #10b981;
}

.sa-coverage-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sa-coverage-text strong {
    font-size: 1rem;
    color: var(--navy-800);
}

.sa-coverage-text span {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.sa-missing-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: #f59e0b;
    font-size: var(--font-sm);
    font-weight: 600;
}

.sa-missing-row {
    background-color: #fffbeb !important;
}

.sa-missing-row:hover {
    background-color: #fef3c7 !important;
}

.admin-dashboard h1 {
    margin-bottom: var(--spacing-lg);
    font-size: 1.75rem;
    color: var(--navy-800);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    letter-spacing: -0.01em;
}


.admin-sections {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.admin-section {
    background: var(--surface-card);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-section:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--gray-300);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    min-height: 40px;
}

.section-header h2 {
    margin: 0;
    font-size: var(--font-md);
    font-weight: 600;
    color: var(--navy-800);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: var(--font-base);
}

.admin-table th,
.admin-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background-color 0.15s ease;
}

.admin-table tbody tr:nth-child(even) {
    background-color: var(--gray-50);
}

.admin-table tbody tr:hover {
    background-color: var(--gray-50);
}

.admin-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.admin-table td.actions {
    white-space: nowrap;
    overflow: visible;
    max-width: none;
}

.table-filter {
    margin-bottom: var(--spacing-md);
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.filter-input {
    flex: 1;
    max-width: 320px;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--font-base);
}

.status-filter {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--font-base);
    background: var(--surface-card);
    cursor: pointer;
    min-width: 140px;
    transition: all 0.2s ease;
}

.status-filter:hover {
    border-color: var(--gray-300);
}

.status-filter:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(175, 9, 37, 0.1);
}

.filter-input::placeholder {
    color: var(--gray-400);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(175, 9, 37, 0.1);
    background: white;
}

.sortable-table th[data-sort] {
    cursor: pointer;
    user-select: none;
}

.sortable-table th[data-sort]:hover {
    background-color: var(--gray-100);
}

.sort-icon {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.collapsible .section-header {
    cursor: pointer;
    user-select: none;
    margin: calc(-1 * var(--spacing-lg)) calc(-1 * var(--spacing-xl));
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--radius-md);
}

.collapsible .section-header:hover {
    background-color: rgba(175, 9, 37, 0.03);
}

.collapsible.expanded .section-header {
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.collapse-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    color: var(--gray-400);
    background: var(--gray-100);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.section-header:hover .collapse-icon {
    background: var(--primary-color);
    color: white;
}

.section-icon {
    font-size: 1rem;
    margin-right: var(--spacing-sm);
    color: var(--primary-color);
    font-weight: bold;
}

.section-content {
    padding-top: var(--spacing-sm);
}

.admin-section.collapsed .section-content {
    display: none;
}

.admin-section .section-content {
    display: block;
}

.customer-logo-thumb {
    max-width: 40px;
    max-height: 30px;
    object-fit: contain;
}

.no-logo {
    color: var(--gray-400);
}

.doc-lib-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
    min-width: 220px;
    justify-content: flex-end;
    align-items: center;
}

.header-actions .btn {
    min-width: 100px;
    text-align: center;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 6px 12px;
    min-width: 200px;
}

.search-box svg {
    color: var(--gray-400);
    flex-shrink: 0;
}

.search-box input {
    border: none;
    outline: none;
    font-size: 0.85rem;
    width: 100%;
    background: transparent;
}

.search-box input::placeholder {
    color: var(--gray-400);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

.admin-table {
    table-layout: fixed;
}

.admin-table th {
    background-color: var(--gray-50);
    font-weight: 600;
    position: relative;
    color: var(--gray-600);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--gray-200);
}

.resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: col-resize;
    background: transparent;
}

.resize-handle:hover,
.resize-handle.resizing {
    background: var(--primary-color);
}

.admin-table .actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.role-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-sm);
    font-weight: 500;
}

.role-internal { background-color: #e0f2fe; color: #075985; }
.role-client { background-color: #f3e8ff; color: #7c3aed; }

.form-page {
    max-width: 600px;
    margin: 0 auto;
}

.form-card {
    background: var(--surface-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
}

.visit-info {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.visit-info p {
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .filters-form {
        grid-template-columns: 1fr;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calendar-table {
        font-size: 0.75rem;
    }
    
    .visit-chip {
        padding: 2px 4px;
        font-size: 0.625rem;
    }
    
    .nav-links {
        gap: 10px;
    }
    
    .nav-user {
        display: none;
    }
}

/* Notification Bell */
.notification-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s ease;
}

.notification-bell:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.notification-bell svg {
    width: 20px;
    height: 20px;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    background-color: var(--danger-color);
    border-radius: 9px;
    border: 2px solid white;
}

/* Notifications Page */
.notifications-page {
    max-width: 800px;
    margin: 0 auto;
}

.notifications-page .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.notifications-page .page-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--navy-800);
}

.notifications-container {
    background: var(--surface-card);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.notifications-list {
    display: flex;
    flex-direction: column;
}

.notification-item {
    display: flex;
    gap: 16px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--gray-100);
    position: relative;
    transition: background-color 0.2s ease;
}

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

.notification-item:hover {
    background-color: var(--gray-50);
}

.notification-item.unread {
    background-color: #f0f7ff;
}

.notification-item.unread:hover {
    background-color: #e8f2ff;
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon svg {
    width: 20px;
    height: 20px;
}

.notification-type-info .notification-icon {
    background-color: #e0f2fe;
    color: #0284c7;
}

.notification-type-success .notification-icon {
    background-color: #dcfce7;
    color: #16a34a;
}

.notification-type-warning .notification-icon {
    background-color: #fef3c7;
    color: #d97706;
}

.notification-type-alert .notification-icon {
    background-color: #fee2e2;
    color: #dc2626;
}

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

.notification-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.notification-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
}

.notification-time {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.notification-message {
    margin: 0 0 12px;
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.notification-actions {
    display: flex;
    gap: 8px;
}

.unread-indicator {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.no-notifications {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.no-notifications svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-notifications p {
    font-size: 1rem;
}

/* Audit Log Page */
.audit-log-page .page-header {
    margin-bottom: 14px;
}

.audit-log-page .page-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--navy-800);
}

.audit-table-container {
    background: var(--surface-card);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow-x: auto;
}

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

.audit-table th,
.audit-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.audit-table th {
    background-color: var(--gray-50);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-600);
    letter-spacing: 0.05em;
}

.audit-table td {
    font-size: 0.875rem;
    color: var(--gray-700);
}

.audit-table tbody tr:hover {
    background-color: var(--gray-50);
}

.details-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: var(--gray-100);
    color: var(--gray-700);
}

.action-badge.action-login { background-color: #e0f2fe; color: #0284c7; }
.action-badge.action-logout { background-color: var(--gray-100); color: var(--gray-600); }
.action-badge.action-visit { background-color: #dcfce7; color: #16a34a; }
.action-badge.action-document { background-color: #fef3c7; color: #d97706; }
.action-badge.action-customer { background-color: #f3e8ff; color: #7c3aed; }
.action-badge.action-site { background-color: #fce7f3; color: #db2777; }
.action-badge.action-user { background-color: #e0f2fe; color: #0284c7; }

.text-muted {
    color: var(--gray-400);
    font-style: italic;
}

/* Dashboard Widgets */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

@media (max-width: 1200px) {
    .dashboard-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
}

.widget-card {
    background: var(--surface-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.widget-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.widget-score {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.widget-score.score-good {
    color: var(--success-color);
}

.widget-score.score-warning {
    color: #e5a500;
}

.widget-score.score-danger {
    color: var(--danger-color);
}

.widget-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--navy-800);
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.widget-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-800);
    margin-bottom: var(--spacing-xs);
}

.widget-sublabel {
    font-size: var(--font-sm);
    color: var(--gray-500);
}

.widget-detail {
    font-size: var(--font-base);
    color: var(--gray-500);
    margin-top: var(--spacing-xs);
}

.widget-overdue.has-overdue {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid var(--danger-color);
}

.widget-overdue.has-overdue .widget-number {
    color: var(--danger-color);
}

.widget-stats {
    display: flex;
    justify-content: space-around;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.widget-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.widget-stats .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-800);
    line-height: 1.2;
}

.widget-stats .stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) 20px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-md);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-card);
}

.quick-action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.quick-action-btn svg {
    flex-shrink: 0;
}

/* Recent Activity Feed */
.recent-activity {
    background: var(--surface-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: var(--spacing-lg);
}

.recent-activity h3 {
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--navy-800);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--gray-200);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease;
}

.activity-item:hover {
    background: var(--gray-100);
}

.activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.activity-icon svg {
    stroke: currentColor;
}

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

.activity-action {
    font-weight: 500;
    color: var(--navy-800);
    font-size: 0.9rem;
}

.activity-detail {
    font-size: 0.8rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--gray-400);
    white-space: nowrap;
    flex-shrink: 0;
}

.activity-empty {
    text-align: center;
    padding: 16px;
    color: var(--gray-500);
    font-style: italic;
}

@media (max-width: 600px) {
    .quick-actions {
        flex-direction: column;
    }
    
    .quick-action-btn {
        justify-content: center;
    }
    
    .activity-time {
        display: none;
    }
}

/* Header Search */
.header-search {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    flex: 1;
    margin: 0 24px;
    margin-left: 55px;
}

.header-search:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(175, 9, 37, 0.1);
    background: white;
}

.header-search input {
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 0.875rem;
    width: 100%;
    flex: 1;
    outline: none;
}

.header-search input::placeholder {
    color: var(--gray-400);
}

.header-search button {
    border: none;
    background: transparent;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.header-search button:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .header-search {
        display: none;
    }
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.breadcrumb a {
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--gray-300);
}

.breadcrumb span:last-child {
    color: var(--gray-700);
    font-weight: 500;
}

/* Sidebar Divider */
.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 8px;
}

/* Sidebar Section Labels */
.sidebar-section-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.4);
    padding: 2px 12px 2px 12px;
    margin-top: 2px;
}

.sidebar.collapsed .sidebar-section-label {
    display: none;
}

/* Sidebar Group */
.sidebar-group {
    margin: 0;
}

.sidebar-group-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-size: 13px;
}

.sidebar-group-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-group.expanded .sidebar-group-toggle {
    color: white;
}

.sidebar-chevron {
    width: 16px;
    height: 16px;
    margin-left: auto;
    transition: transform 0.2s;
}

.sidebar-group.expanded .sidebar-chevron {
    transform: rotate(180deg);
}

.sidebar-group-items {
    display: none;
    padding-left: 0;
}

.sidebar-group.expanded .sidebar-group-items {
    display: block;
}

.sidebar-sublink {
    padding-left: 28px !important;
}

.sidebar.collapsed .sidebar-group-toggle .sidebar-label,
.sidebar.collapsed .sidebar-group-toggle .sidebar-chevron {
    display: none;
}

.sidebar.collapsed .sidebar-group-items {
    display: none;
}

.sidebar.collapsed .sidebar-group.expanded .sidebar-group-items {
    display: none;
}

/* Search Results Page */
.search-results-page {
    max-width: 900px;
}

.search-form-container {
    margin-bottom: 14px;
}

.search-form-large {
    display: flex;
    gap: 12px;
}

.search-form-large input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form-large input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(175, 9, 37, 0.1);
}

.search-form-large .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.search-summary {
    color: var(--gray-600);
    margin-bottom: 14px;
}

.search-results-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.search-section {
    background: var(--surface-card);
    padding: 14px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.search-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy-800);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.result-item:hover {
    background: var(--gray-100);
    transform: translateX(4px);
}

.result-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.result-icon img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

.result-icon.customer-icon {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: var(--info-color);
}

.result-icon.site-icon {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: var(--success-color);
}

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

.result-name {
    display: block;
    font-weight: 600;
    color: var(--navy-800);
    margin-bottom: 2px;
}

.result-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.result-status {
    flex-shrink: 0;
}

.no-results,
.search-prompt {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface-card);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.no-results svg,
.search-prompt svg {
    color: var(--gray-300);
    margin-bottom: 16px;
}

.no-results h3,
.search-prompt h3 {
    font-size: 1.25rem;
    color: var(--navy-800);
    margin-bottom: 8px;
}

.no-results p,
.search-prompt p {
    color: var(--gray-500);
    margin-bottom: 12px;
}

/* Profile Page */
.profile-page {
    max-width: 900px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}

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

.profile-card {
    background: var(--surface-card);
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.profile-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-800);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.profile-info {
    grid-row: span 2;
    text-align: center;
    padding-top: 32px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.avatar-initials {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.profile-info h2 {
    font-size: 1.25rem;
    color: var(--navy-800);
    margin-bottom: 4px;
}

.profile-email {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.profile-role-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.role-internal {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.role-client {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #075985;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.detail-value {
    font-weight: 500;
    color: var(--navy-800);
}

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

.password-form .btn {
    align-self: flex-start;
}

.preferences-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preference-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.preference-item input {
    margin-top: 4px;
}

.preference-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.preference-text strong {
    font-size: 0.9rem;
    color: var(--navy-800);
}

.preference-text small {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.preferences-note {
    margin-top: 16px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Help Page */
.help-page {
    max-width: 1000px;
}

.help-subtitle {
    color: var(--gray-500);
    margin-top: 8px;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

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

.help-section {
    background: var(--surface-card);
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.help-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy-800);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.help-faq {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .help-faq {
        grid-column: span 1;
    }
}

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

.quicklink-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
    text-decoration: none;
    color: var(--gray-600);
    transition: all 0.2s ease;
}

.quicklink-item:hover {
    background: var(--primary-color);
    color: white;
}

.quicklink-item svg {
    color: var(--primary-color);
    transition: color 0.2s ease;
}

.quicklink-item:hover svg {
    color: white;
}

.quicklink-item span {
    font-weight: 500;
    font-size: 0.9rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-item svg {
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-item strong {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.contact-item a,
.contact-item span {
    color: var(--navy-800);
    font-weight: 500;
}

.contact-item a:hover {
    color: var(--primary-color);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--gray-50);
    border-radius: 8px;
    overflow: hidden;
}

.faq-item summary {
    padding: 14px 16px;
    font-weight: 500;
    color: var(--navy-800);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: '▶';
    font-size: 0.7rem;
    color: var(--gray-400);
    transition: transform 0.2s ease;
}

.faq-item[open] summary::before {
    transform: rotate(90deg);
}

.faq-item summary:hover {
    background: var(--gray-100);
}

.faq-answer {
    padding: 0 16px 14px 32px;
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.faq-answer ul {
    margin: 8px 0;
    padding-left: 20px;
}

.faq-answer li {
    margin: 4px 0;
}

.tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tips-list li {
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.tips-list li strong {
    color: var(--navy-800);
}

/* Discipline Form Styles */
.discipline-form-page {
    max-width: 900px;
}

.discipline-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-section {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    border: none;
}

.form-section.collapsed .form-section-content {
    display: none;
}

.form-section.collapsed .section-toggle {
    transform: rotate(-90deg);
}

.form-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    background: transparent;
    border-bottom: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.form-section-header:hover {
    background: transparent;
}

.form-section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-800);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-header h2 i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.section-toggle {
    color: var(--gray-400);
    transition: transform 0.2s ease;
}

.form-section-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-section.internal-section {
    border: none;
    background: transparent;
}

.form-section.internal-section .form-section-header {
    background: transparent;
    border: none;
}

.form-section.internal-section .form-section-header h2 i {
    color: #f59e0b;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.statutory-checkbox {
    background: #fef2f2;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

.statutory-checkbox .checkbox-label {
    font-weight: 600;
    color: var(--primary-color);
}

.statutory-checkbox .checkbox-label i {
    margin-right: 6px;
}

/* Statutory Badge Styles */
.statutory-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.statutory-badge i {
    font-size: 0.65rem;
}

.statutory-badge.badge-small {
    font-size: 0.6rem;
    padding: 2px 6px;
}

/* Risk Rating Badges */
.risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.risk-badge.risk-high {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.risk-badge.risk-medium {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.risk-badge.risk-low {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Quote Request Section */
.quote-request-section {
    margin-bottom: 1.5rem;
}

.quote-request-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0284c7;
    border-radius: 12px;
    padding: 1.5rem;
}

.quote-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.quote-header svg {
    color: #0284c7;
}

.quote-header h2 {
    font-size: 1.25rem;
    color: #0369a1;
    margin: 0;
}

.quote-intro {
    color: #475569;
    margin-bottom: 1rem;
}

.quote-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.quote-form .form-group {
    margin-bottom: 0.75rem;
}

.quote-form .form-group label {
    display: block;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.quote-form .form-group input,
.quote-form .form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.875rem;
}

.quote-form .form-group input:focus,
.quote-form .form-group textarea:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.quote-form .form-group small {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.quote-form button[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Discipline Detail Page */
.discipline-detail {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.discipline-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.discipline-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.discipline-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.discipline-card-header {
    padding: 16px 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}

.discipline-card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy-800);
    margin: 0;
}

.discipline-card-header i {
    color: var(--primary-color);
}

.discipline-card-content {
    padding: 14px;
}

.regulation-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.regulation-code {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e0f2fe;
    color: #0369a1;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
}

.regulation-title {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.regulation-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    font-size: 0.85rem;
    text-decoration: none;
}

.regulation-link:hover {
    text-decoration: underline;
}

.requirements-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.requirement-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
}

.requirement-item i {
    color: var(--primary-color);
    margin-top: 3px;
}

.requirement-item strong {
    display: block;
    color: var(--navy-800);
    margin-bottom: 4px;
}

.requirement-item p {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: 8px;
    text-decoration: none;
    color: var(--navy-800);
    transition: all 0.2s ease;
    border: 1px solid var(--gray-200);
}

.resource-link:hover {
    background: var(--gray-100);
    border-color: var(--primary-color);
}

.resource-link i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Calendar Statutory Highlight */
.visit-chip.statutory {
    position: relative;
}

.visit-chip.statutory::before {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid white;
    z-index: 2;
}

/* Calendar Remediation Dot Indicator */
.visit-chip.has-remediation::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    border: 2px solid white;
    z-index: 1;
}

/* When both statutory and remediation - offset the remediation dot to the left */
.visit-chip.statutory.has-remediation::after {
    right: 6px;
}

/* Discipline Detail Page */
.discipline-detail {
    max-width: 1200px;
    margin: 0 auto;
}

.discipline-header {
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 14px;
}

.discipline-header h1 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    color: var(--navy-800);
}

.discipline-description {
    color: var(--gray-600);
    font-size: 1rem;
    line-height: 1.6;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 20px;
    font-size: var(--font-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-statutory {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
}

.badge-statutory-sm {
    display: inline-flex;
    align-items: center;
    padding: 2px var(--spacing-sm);
    border-radius: var(--radius-md);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    margin-left: var(--spacing-sm);
}

.badge-risk {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 20px;
    font-size: var(--font-sm);
    font-weight: 600;
}

.badge-risk-sm {
    display: inline-flex;
    align-items: center;
    padding: 2px var(--spacing-sm);
    border-radius: var(--radius-md);
    font-size: var(--font-xs);
    font-weight: 600;
}

.risk-high, .badge-risk.risk-high, .badge-risk-sm.risk-high {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.risk-medium, .badge-risk.risk-medium, .badge-risk-sm.risk-medium {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.risk-low, .badge-risk.risk-low, .badge-risk-sm.risk-low {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Visit Count Badges */
.visit-count-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: var(--font-sm);
    font-weight: 600;
    white-space: nowrap;
}

.visit-count-none {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.visit-count-warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.visit-count-ok {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Detail Sections */
.detail-section {
    background: var(--surface-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--spacing-md);
}

.detail-section h2 {
    color: var(--navy-800);
    font-size: 1.25rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.info-item {
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
}

.info-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.info-item span, .info-item a {
    font-size: 0.95rem;
    color: var(--navy-800);
}

/* Summary Content */
.summary-content, .guidance-content {
    color: var(--gray-700);
    line-height: 1.7;
}

.summary-content p, .guidance-content p {
    margin-bottom: 12px;
}

.guidance-content ul, .guidance-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.guidance-content li {
    margin-bottom: 6px;
}

/* Requirements Grid */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.requirement-card {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 14px;
    border: 1px solid var(--gray-200);
}

.requirement-card .requirement-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.requirement-card .requirement-icon svg {
    color: var(--primary-color);
}

.requirement-card h3 {
    font-size: 0.85rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.requirement-card p {
    color: var(--navy-800);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Risk Description */
.risk-description {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.risk-description .badge {
    align-self: flex-start;
}

.risk-description p {
    color: var(--gray-700);
    line-height: 1.7;
    margin: 0;
}

/* FAQ Section */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 16px 20px;
    border: 1px solid var(--gray-200);
}

.faq-question {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
    color: var(--navy-800);
    margin-bottom: 10px;
}

.faq-question svg {
    flex-shrink: 0;
    color: var(--primary-color);
    margin-top: 2px;
}

.faq-answer {
    color: var(--gray-600);
    line-height: 1.6;
    padding-left: 28px;
}

/* Resources List */
.resources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.resources-list .resource-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--gray-50);
    border-radius: 8px;
    text-decoration: none;
    color: var(--navy-800);
    transition: all 0.2s ease;
    border: 1px solid var(--gray-200);
    font-weight: 500;
}

.resources-list .resource-link:hover {
    background: var(--gray-100);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.resources-list .resource-link svg {
    color: var(--primary-color);
}

/* Back Link */
.back-link {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--gray-200);
}

.back-link .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Admin Name Links */
.discipline-link,
.admin-name-link {
    color: var(--gray-900);
    text-decoration: none;
    font-weight: 500;
}

.discipline-link:hover,
.admin-name-link:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

/* Regulation Code Small */
.regulation-code-sm {
    display: inline-flex;
    align-items: center;
    background: #e0f2fe;
    color: #0369a1;
    font-family: 'Courier New', monospace;
    font-size: var(--font-sm);
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
}

/* Modern Toggle Switch */
.modern-form .toggle-group {
    padding: var(--spacing-lg) 20px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.modern-form .toggle-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    cursor: pointer;
}

.modern-form .toggle-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.modern-form .toggle-switch {
    width: 52px;
    min-width: 52px;
    height: 28px;
    background: #cbd5e1;
    border-radius: 14px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: block;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.modern-form .toggle-switch::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.modern-form .toggle-label input:checked + .toggle-switch {
    background: #22c55e;
}

.modern-form .toggle-label input:checked + .toggle-switch::after {
    transform: translateX(24px);
}

.modern-form .toggle-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--navy-800);
}

.modern-form .toggle-status {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.modern-form .toggle-label input:checked ~ .toggle-status {
    background: #dcfce7;
    color: #16a34a;
}

.modern-form .toggle-label input:not(:checked) ~ .toggle-status {
    background: #fee2e2;
    color: #dc2626;
}

/* Icon Picker */
.icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.icon-option {
    width: 50px;
    height: 50px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.icon-option:hover {
    border-color: var(--primary-color);
    background: var(--gray-50);
}

.icon-option.selected {
    border-color: var(--primary-color);
    background: rgba(175, 9, 37, 0.1);
    box-shadow: 0 0 0 2px rgba(175, 9, 37, 0.2);
}

.icon-option svg {
    width: 28px;
    height: 28px;
    color: var(--navy-800);
}

.icon-option.selected svg {
    color: var(--primary-color);
}

/* Searchable Select Component */
.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-display {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 32px;
    box-sizing: border-box;
    color: var(--gray-800);
}

.searchable-display:hover {
    border-color: var(--gray-400);
}

.searchable-select.open .searchable-display {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(175, 9, 37, 0.1);
}

.searchable-arrow {
    flex-shrink: 0;
    margin-left: 8px;
    color: var(--gray-500);
    transition: transform 0.2s;
}

.searchable-select.open .searchable-arrow {
    transform: rotate(180deg);
}

.searchable-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 99999;
    display: none;
    overflow: hidden;
}

.searchable-select.open .searchable-dropdown {
    display: block;
}

.searchable-input {
    width: 100%;
    padding: 6px 8px;
    border: none;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
}

.searchable-input:focus {
    background: var(--gray-50);
}

.searchable-options {
    max-height: 200px;
    overflow-y: auto;
}

.searchable-option {
    padding: 6px 8px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.8rem;
    font-family: inherit;
    color: var(--gray-800);
}

.searchable-option:hover {
    background: var(--gray-100);
}

.searchable-option.selected {
    background: rgba(175, 9, 37, 0.08);
    color: var(--primary-color);
    font-weight: 600;
}

.searchable-no-results {
    padding: 16px;
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
}

/* Year Navigation */
.year-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--surface-card);
    padding: var(--spacing-sm) var(--spacing-lg);
    margin-left: calc(-1 * var(--spacing-lg));
    margin-right: calc(-1 * var(--spacing-lg));
    border-bottom: 1px solid var(--gray-200);
    width: calc(100% + 2 * var(--spacing-lg));
    box-sizing: border-box;
}

.year-navigation h2 {
    margin: 0;
    font-size: var(--font-lg);
    color: var(--navy-800);
    min-width: 70px;
    text-align: center;
}

.year-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--navy-800);
    text-decoration: none;
    transition: all 0.2s;
}

.year-nav-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.year-nav-btn svg {
    flex-shrink: 0;
}

/* No Visits Warning */
.no-visits-warning {
    margin-left: 6px;
    cursor: help;
}

/* Current Month Highlight */
.calendar-table th.current-month,
.calendar-table td.current-month {
    background: rgba(175, 9, 37, 0.08);
    box-shadow: inset 2px 0 0 #af0925, inset -2px 0 0 #af0925;
}

.calendar-table th.current-month {
    background: rgba(175, 9, 37, 0.15);
    color: #af0925;
    font-weight: 600;
    box-shadow: inset 2px 0 0 #af0925, inset -2px 0 0 #af0925, inset 0 2px 0 #af0925;
}

.calendar-table tbody tr:last-child td.current-month {
    box-shadow: inset 2px 0 0 #af0925, inset -2px 0 0 #af0925, inset 0 -2px 0 #af0925;
}

/* Next Month Highlight - subtle teal tint for planning ahead */
.calendar-table th.next-month,
.calendar-table td.next-month {
    background: rgba(42, 115, 158, 0.06);
}

.calendar-table th.next-month {
    background: rgba(42, 115, 158, 0.12);
    color: var(--info-color);
    font-weight: 500;
}

/* Today Button */
.btn-today {
    margin-left: var(--spacing-md);
    padding: 5px 10px;
    font-size: 0.75rem;
    height: 28px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Calendar Chip with Job Number */
.visit-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 32px;
    padding: 1px 3px;
}

.chip-job {
    font-size: 9px;
    font-weight: 500;
    opacity: 0.9;
    max-width: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chip-content {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.chip-day {
    font-size: 11px;
    font-weight: 600;
}

/* Ghost chip for late completions - shows where actually completed */
.visit-chip.ghost-chip {
    opacity: 0.5;
    border: 1px dashed rgba(255, 255, 255, 0.6);
    background: transparent !important;
    color: #f59e0b;
    font-weight: 500;
}

.visit-chip.ghost-chip.chip-completed_late {
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1px dashed #f59e0b;
}

.ghost-label {
    font-size: 10px;
    white-space: nowrap;
}

/* Week number label for weekly disciplines */
.week-label {
    font-size: 8px;
    font-weight: 600;
    opacity: 0.85;
    display: block;
    line-height: 1;
    margin-bottom: 1px;
}

/* Highlight effect when hovering linked chips */
.visit-chip.chip-highlight {
    outline: 2px solid #1e293b;
    outline-offset: 1px;
    transform: scale(1.15);
    z-index: 10;
    position: relative;
}

/* Legend toggle for ghost markers */
.legend-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-left: var(--spacing-md);
    padding-left: var(--spacing-md);
    border-left: 1px solid var(--gray-200);
    cursor: pointer;
    font-size: var(--font-xs);
    color: #64748b;
}

.legend-toggle input[type="checkbox"] {
    width: 12px;
    height: 12px;
    cursor: pointer;
    accent-color: var(--warning-color);
}

.legend-toggle .toggle-text {
    user-select: none;
}

/* Equal size action buttons */
.detail-actions .btn {
    min-width: 110px;
    text-align: center;
}

/* Form Section Styling */
.form-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--gray-200);
}

.form-section h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--navy-800);
    font-size: var(--font-lg);
}

/* Remediation Panel */
.remediation-panel {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: var(--radius-md);
}

.remediation-panel.completed {
    background: #d1fae5;
    border-color: #10b981;
}

.remediation-panel.overdue {
    background: #fee2e2;
    border-color: #ef4444;
}

.remediation-panel h3 {
    margin: 0 0 var(--spacing-sm) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: #92400e;
    font-size: var(--font-md);
}

.remediation-panel.completed h3 {
    color: #065f46;
}

.remediation-panel.overdue h3 {
    color: #991b1b;
}

.remediation-panel.needs-docs {
    border-color: #f59e0b;
}

.docs-warning-alert {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: var(--radius-sm);
    color: #92400e;
    font-size: var(--font-sm);
    margin-bottom: var(--spacing-sm);
}

.docs-warning-alert svg {
    flex-shrink: 0;
    color: #f59e0b;
}

.remediation-status-badge {
    display: inline-block;
    padding: 2px var(--spacing-sm);
    border-radius: 10px;
    font-size: var(--font-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.remediation-status-badge.identified { background: #fef3c7; color: #92400e; }
.remediation-status-badge.quote_sent { background: #dbeafe; color: #1e40af; }
.remediation-status-badge.quote_accepted { background: #d1fae5; color: #065f46; }
.remediation-status-badge.quote_declined { background: #fee2e2; color: #991b1b; }
.remediation-status-badge.scheduled { background: #e0e7ff; color: #3730a3; }
.remediation-status-badge.completed { background: #d1fae5; color: #065f46; }
.remediation-status-badge.cancelled { background: #f3f4f6; color: #6b7280; }

.remediation-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.remediation-detail-item label {
    display: block;
    font-size: var(--font-xs);
    color: var(--gray-500);
    margin-bottom: 1px;
}

.remediation-detail-item span {
    font-weight: 500;
    font-size: var(--font-base);
    color: var(--gray-800);
}

/* Calendar Remediation Indicator - Hatched Pattern */
.visit-chip.has-remediation {
    position: relative;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(245, 158, 11, 0.4) 2px,
        rgba(245, 158, 11, 0.4) 4px
    ), #fef3c7 !important;
    border: 2px solid #f59e0b !important;
    color: #92400e !important;
}

/* Calendar Missing Paperwork - Hatched Pattern */
.visit-chip.missing-paperwork {
    position: relative;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 2px,
        rgba(220, 38, 38, 0.3) 2px,
        rgba(220, 38, 38, 0.3) 4px
    ), #fef2f2 !important;
    border: 2px solid #dc2626 !important;
    color: #991b1b !important;
}

/* When both issues exist on same chip - both patterns visible with red border */
.visit-chip.has-remediation.missing-paperwork {
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(245, 158, 11, 0.35) 2px,
        rgba(245, 158, 11, 0.35) 4px
    ), repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 2px,
        rgba(220, 38, 38, 0.35) 2px,
        rgba(220, 38, 38, 0.35) 4px
    ), #fef2f2 !important;
    border: 2px solid #dc2626 !important;
    box-shadow: inset 0 0 0 2px #f59e0b;
}

.remediation-indicator {
    font-size: 8px;
    position: absolute;
    top: -4px;
    right: -4px;
}

.declined-remediation-indicator {
    font-size: 8px;
    position: absolute;
    top: -4px;
    left: -4px;
}

/* Calendar Declined Remediation Indicator - Strikethrough Pattern with red color */
.visit-chip.has-declined-remediation {
    position: relative;
    border: 2px solid #7f1d1d !important;
}

/* Strikethrough line for declined remediations */
.visit-chip.has-declined-remediation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -2px;
    right: -2px;
    height: 2px;
    background: #dc2626;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    color: var(--gray-700);
    text-decoration: none;
    font-size: var(--font-base);
    transition: all 0.15s ease;
}

.filter-btn:hover {
    background: var(--gray-200);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Overdue Row and Indicator */
.overdue-row {
    background: #fef2f2;
}

.overdue-indicator {
    display: inline-block;
    margin-left: var(--spacing-sm);
    padding: 2px var(--spacing-sm);
    background: #ef4444;
    color: white;
    font-size: var(--font-xs);
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

/* Warning Button */
.btn-warning {
    background: #f59e0b;
    color: white;
    border: none;
}

.btn-warning:hover {
    background: #d97706;
}

/* Planned Jobs Styles */
.record-count {
    background: var(--gray-200);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: var(--font-base);
    color: var(--gray-500);
    margin-left: var(--spacing-md);
}

.record-count-inline {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gray-500);
}

.page-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.page-title-row .page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy-800);
    margin: 0;
}

.remediation-indicator-small {
    font-size: 12px;
    margin-left: 4px;
}

.statutory-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #dc2626;
    color: white;
    font-size: 9px;
    font-weight: 600;
    border-radius: 4px;
    margin-left: 6px;
    text-transform: uppercase;
}

.table-container {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-top: var(--spacing-lg);
}

.planned-jobs-table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.planned-jobs-table th,
.planned-jobs-table td {
    padding: 4px 6px;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
}

.planned-jobs-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    padding: 5px 6px;
}

.planned-jobs-table td {
    font-size: 0.75rem;
    color: var(--gray-700);
    vertical-align: middle;
}

.planned-jobs-table tbody tr:hover {
    background: var(--gray-50);
}

.planned-jobs-table tbody tr:nth-child(even) {
    background: var(--gray-50);
}

.planned-jobs-table tbody tr:nth-child(even):hover {
    background: var(--gray-100);
}

.planned-jobs-table .overdue-row {
    background: #fef2f2;
}

.planned-jobs-table .overdue-row:hover {
    background: #fee2e2;
}

/* Bulk Action Bar - Planned Jobs */
.bulk-action-bar {
    background: var(--surface-card);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-card);
}

.bulk-action-info {
    font-weight: 600;
    font-size: var(--font-sm);
    color: var(--info-color);
}

.bulk-action-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.bulk-action-controls label {
    font-weight: 500;
    font-size: var(--font-sm);
    color: var(--gray-600);
    margin: 0;
}

.bulk-action-controls input[type="date"] {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: var(--font-sm);
    height: 30px;
}

.bulk-action-controls .btn {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-sm);
    height: 30px;
    min-height: 30px;
}

.btn-success {
    background: var(--success-color);
    color: white;
    border: none;
}

.btn-success:hover {
    background: #22a354;
}

.visit-checkbox,
#selectAll {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.needs-docs-row {
    border-left: 4px solid #f59e0b;
}

.doc-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.doc-status.doc-ok {
    color: #16a34a;
}

.doc-status.doc-missing {
    color: #f59e0b;
}

.doc-status.doc-missing svg {
    animation: pulse-warning 2s ease-in-out infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Redesigned Upload Form */
.upload-form-redesigned {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upload-form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
}

.upload-form-row .form-group {
    margin-bottom: 0;
}

.upload-form-redesigned .drop-zone {
    margin-top: 0;
}

.btn-upload-full {
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .upload-form-row {
        grid-template-columns: 1fr;
    }
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-scheduled {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed_on_time,
.status-completed_early {
    background: #d1fae5;
    color: #065f46;
}

.status-completed_late {
    background: #fef3c7;
    color: #92400e;
}

.status-overdue {
    background: #fee2e2;
    color: #991b1b;
}

.customer-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-xs);
    font-weight: 500;
    margin: 2px 2px 2px 0;
}

.customer-badge.primary {
    background: var(--primary-color);
    color: white;
}

.customer-badge.shared {
    background: #e0e7ff;
    color: #3730a3;
}

/* Drag and Drop Upload */
.drop-zone {
    border: 2px dashed var(--gray-300);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: var(--gray-50);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.form-group:has(.drop-zone) {
    width: 100%;
    max-width: none;
}

.upload-section .form-group:has(.drop-zone),
.modern-form .form-group:has(.drop-zone),
.import-form .form-group:has(.drop-zone) {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

/* Full-width drop zone container */
.drop-zone-container {
    width: 100%;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.drop-zone-container > label {
    display: block;
    font-weight: 600;
    color: var(--navy-800);
    margin-bottom: 12px;
    font-size: 14px;
}

.drop-zone:hover {
    border-color: var(--primary-color);
    background: #fef2f2;
}

.drop-zone.drag-over {
    border-color: var(--primary-color);
    background: #fef2f2;
    border-style: solid;
    transform: scale(1.01);
}

.drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-zone-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: var(--gray-400);
}

.drop-zone.drag-over .drop-zone-icon {
    color: var(--primary-color);
}

.drop-zone-text {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 8px;
}

.drop-zone-text strong {
    color: var(--primary-color);
}

.drop-zone-hint {
    color: var(--gray-400);
    font-size: 12px;
}

.drop-zone-file {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    margin-top: 12px;
}

.drop-zone-file.has-file {
    display: flex;
}

.drop-zone-file-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.drop-zone-file-name {
    flex: 1;
    font-size: 13px;
    color: var(--gray-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drop-zone-file-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone-file-remove:hover {
    color: var(--danger-color);
}

.documents-management {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--gray-200);
}

.documents-management h3 {
    margin-bottom: 16px;
    color: var(--navy-800);
    font-size: 18px;
    font-weight: 600;
}

.documents-management h4 {
    margin-bottom: 12px;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 600;
}

.documents-management .upload-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.upload-cta {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.drop-zone-files-list {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    width: 100%;
}

.drop-zone.has-files .drop-zone-files-list {
    display: flex;
}

.drop-zone.has-files .drop-zone-icon,
.drop-zone.has-files .drop-zone-text,
.drop-zone.has-files .drop-zone-hint {
    display: none;
}

.drop-zone-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
}

.drop-zone-file-item .drop-zone-file-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.drop-zone-file-item .drop-zone-file-name {
    flex: 1;
    font-size: 13px;
    color: var(--gray-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Site Accordion Calendar Styles */
.accordion-controls {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.accordion-controls .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.site-accordion {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.site-panel {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.site-panel:hover {
    box-shadow: var(--shadow-hover);
}

.site-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    cursor: pointer;
    background: var(--gray-50);
    border-bottom: 1px solid transparent;
    transition: background 0.2s ease;
    user-select: none;
}

.site-panel-header:hover {
    background: var(--gray-100);
}

.site-panel.expanded .site-panel-header {
    border-bottom-color: var(--gray-200);
}

.site-panel-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.site-panel-logo {
    height: 28px;
    max-width: 70px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.accordion-chevron {
    color: var(--gray-400);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.site-panel.expanded .accordion-chevron {
    transform: rotate(90deg);
}

.site-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.site-name {
    font-weight: 600;
    color: var(--navy-800);
    font-size: var(--font-base);
}

.customer-name {
    font-size: var(--font-xs);
    color: var(--gray-500);
}

.site-panel-stats {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px var(--spacing-sm);
    border-radius: var(--radius-lg);
    font-size: var(--font-xs);
    font-weight: 600;
}

.stat-badge.late {
    background-color: #fef3c7;
    color: #92400e;
}

.stat-badge.overdue {
    background-color: #fee2e2;
    color: #991b1b;
}

.stat-badge.compliant-badge {
    background-color: #dcfce7;
    color: #166534;
    font-weight: 600;
}

.stat-badge.non-compliant-badge {
    background-color: #fee2e2;
    color: #991b1b;
    font-weight: 600;
}

.stat-badge.scheduled {
    background-color: #e0f2fe;
    color: #075985;
}

.stat-badge.missing-paperwork {
    background: repeating-linear-gradient(
        -45deg,
        #fef2f2,
        #fef2f2 3px,
        #fecaca 3px,
        #fecaca 6px
    );
    color: #991b1b;
    border: 1px solid #dc2626;
}

.stat-badge.open-remediation {
    background: repeating-linear-gradient(
        45deg,
        #fef3c7,
        #fef3c7 3px,
        #fde68a 3px,
        #fde68a 6px
    );
    color: #92400e;
    border: 1px solid #f59e0b;
}

.stat-badge.compliance {
    min-width: 48px;
    justify-content: center;
}

.stat-badge.compliance.green {
    background-color: #dcfce7;
    color: #166534;
}

.stat-badge.compliance.amber {
    background-color: #fef3c7;
    color: #92400e;
}

.stat-badge.compliance.red {
    background-color: #fee2e2;
    color: #991b1b;
}

.site-panel-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
}

.site-panel.expanded .site-panel-content {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
}

.site-panel-content .calendar-table-wrapper {
    padding: var(--spacing-sm) var(--spacing-lg) var(--spacing-lg);
}

.statutory-discipline {
    background-color: rgba(175, 9, 37, 0.05);
}

.statutory-icon {
    margin-left: 6px;
    color: var(--primary-color);
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .site-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .site-panel-stats {
        width: 100%;
        justify-content: flex-start;
    }
    
    .accordion-controls {
        flex-wrap: wrap;
    }
}

.simpro-link {
    color: var(--info-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

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

.simpro-link .simpro-icon {
    margin-left: 6px;
    vertical-align: middle;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.simpro-link:hover .simpro-icon {
    opacity: 1;
}

/* Services Library Styles */
.services-library {
    padding-bottom: 40px;
}

.services-library .page-header {
    margin-bottom: 24px;
}

.services-library .page-header h1 {
    font-size: 1.75rem;
    color: var(--navy-800);
    margin-bottom: 8px;
}

.services-library .page-subtitle {
    color: var(--gray-600);
    font-size: 0.95rem;
    max-width: 800px;
    line-height: 1.6;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.service-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: 1px solid var(--gray-200);
}

.service-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.service-card.statutory {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(to right, rgba(175, 9, 37, 0.02), white 15%);
}

.service-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.service-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 8px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.service-icon svg {
    width: 22px;
    height: 22px;
}

.service-card.statutory .service-icon {
    background: rgba(175, 9, 37, 0.1);
}

.service-title-section {
    flex: 1;
    min-width: 0;
}

.service-title-section h3 {
    font-size: 1.1rem;
    color: var(--navy-800);
    margin: 0;
    line-height: 1.3;
}

.statutory-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(175, 9, 37, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.risk-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.risk-badge.risk-high {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.risk-badge.risk-medium {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
}

.risk-badge.risk-low {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}

.service-status {
    margin-bottom: 12px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 20px;
}

.status-badge.status-active {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}

.status-badge.status-not-active {
    background: var(--gray-100);
    color: var(--gray-500);
}

.status-badge.status-internal {
    background: rgba(42, 115, 158, 0.1);
    color: var(--info-color);
}

.status-badge.status-inactive {
    background: var(--gray-100);
    color: var(--gray-400);
}

.service-description {
    color: var(--gray-700);
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 12px;
}

.service-guidance {
    background: var(--gray-50);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    border-left: 3px solid var(--info-color);
}

.service-guidance p {
    color: var(--gray-700);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.service-details {
    margin-bottom: 16px;
}

.service-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 10px 12px;
    background: var(--gray-50);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-700);
    list-style: none;
    transition: background 0.2s ease;
}

.service-details summary::-webkit-details-marker {
    display: none;
}

.service-details summary:hover {
    background: var(--gray-100);
}

.service-details[open] summary {
    border-radius: 6px 6px 0 0;
}

.service-details[open] .details-chevron {
    transform: rotate(180deg);
}

.details-chevron {
    transition: transform 0.2s ease;
    color: var(--gray-500);
}

.details-content {
    padding: 16px;
    background: var(--gray-50);
    border-radius: 0 0 6px 6px;
    border-top: 1px solid var(--gray-200);
}

.detail-section {
    margin-bottom: 16px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy-700);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-item {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

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

.detail-label {
    font-weight: 600;
    color: var(--gray-600);
    flex-shrink: 0;
}

.detail-value {
    color: var(--gray-800);
}

.detail-value-block {
    color: var(--gray-700);
    line-height: 1.55;
    margin: 0;
}

.detail-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--info-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.detail-link:hover {
    text-decoration: underline;
}

.resource-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--info-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.resource-link:hover {
    border-color: var(--info-color);
    background: rgba(42, 115, 158, 0.05);
}

.no-details {
    color: var(--gray-500);
    font-size: 0.85rem;
    font-style: italic;
}

.service-card-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.services-library .empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--gray-50);
    border-radius: 8px;
}

.services-library .empty-state svg {
    color: var(--gray-400);
    margin-bottom: 16px;
}

.services-library .empty-state h3 {
    color: var(--gray-700);
    margin-bottom: 8px;
}

.services-library .empty-state p {
    color: var(--gray-500);
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card-header {
        flex-wrap: wrap;
    }
    
    .risk-badge {
        order: 3;
        width: 100%;
        text-align: center;
        margin-top: 8px;
    }
}

/* Dashboard V2 - Modern Redesign */
.dashboard-v2 {
    padding: 0;
}

.dashboard-v2 .page-container {
    max-width: none;
    width: 100%;
    margin: 0;
}

.dashboard-v2 .page-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.dashboard-v2 .page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy-800);
    margin: 0;
}

/* Dashboard-specific filter widths */
.dashboard-v2 .filter-group.filter-customer {
    flex: 0 1 300px !important;
    min-width: 80px !important;
}

.dashboard-v2 .filter-group.filter-contract {
    flex: 0 1 200px !important;
    min-width: 100px !important;
}

.dashboard-v2 .filter-group.filter-site {
    flex: 0 1 400px !important;
    min-width: 100px !important;
}

.dashboard-v2 .filter-group.filter-discipline {
    flex: 0 1 350px !important;
    min-width: 80px !important;
}

.dashboard-v2 .filter-group.filter-year {
    flex: 0 1 100px !important;
    min-width: 60px !important;
}

/* Calendar-specific filter widths */
.calendar-page {
    padding: 0;
}

.calendar-page .filter-group.filter-customer {
    flex: 0 1 300px !important;
    min-width: 80px !important;
}

.calendar-page .filter-group.filter-contract {
    flex: 0 1 200px !important;
    min-width: 100px !important;
}

.calendar-page .filter-group.filter-site {
    flex: 0 1 400px !important;
    min-width: 100px !important;
}

.calendar-page .filter-group.filter-discipline {
    flex: 0 1 350px !important;
    min-width: 80px !important;
}

.calendar-page .filter-group.filter-year {
    flex: 0 1 100px !important;
    min-width: 60px !important;
}

.calendar-page .filter-group.filter-status {
    flex: 0 1 200px !important;
    min-width: 80px !important;
}

.calendar-page .filter-group.filter-month {
    flex: 0 1 150px !important;
    min-width: 60px !important;
}

/* Timeline-specific filter widths */
.timeline-page .filter-group.filter-customer {
    flex: 0 1 300px !important;
    min-width: 80px !important;
}

.timeline-page .filter-group.filter-site {
    flex: 0 1 600px !important;
    min-width: 100px !important;
}

.timeline-page .filter-group.filter-discipline {
    flex: 0 1 350px !important;
    min-width: 80px !important;
}

.timeline-page .filter-group.filter-date {
    flex: 0 1 150px !important;
    min-width: 80px !important;
}

/* Notifications-specific filter widths */
.document-library-compact .filter-group.filter-customer {
    flex: 0 1 300px !important;
    min-width: 80px !important;
}

.document-library-compact .filter-group.filter-site {
    flex: 0 1 600px !important;
    min-width: 100px !important;
}

.document-library-compact .filter-group.filter-discipline {
    flex: 0 1 350px !important;
    min-width: 80px !important;
}

/* Reports-specific filter widths */
.reports-page .filter-group.filter-customer {
    flex: 0 1 300px !important;
    min-width: 80px !important;
}

.reports-page .filter-group.filter-site {
    flex: 0 1 600px !important;
    min-width: 100px !important;
}

.reports-page .filter-group.filter-discipline {
    flex: 0 1 350px !important;
    min-width: 80px !important;
}

.reports-page .filter-group.filter-year {
    flex: 0 1 100px !important;
    min-width: 60px !important;
}

.reports-page .filter-group.filter-date {
    flex: 0 1 150px !important;
    min-width: 80px !important;
}

/* Simplified Reports Grid */
.reports-grid-simple {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

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

@media (max-width: 640px) {
    .reports-grid-simple {
        grid-template-columns: 1fr;
    }
}

.report-card {
    background: var(--surface-card);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

.report-card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-md);
}

.report-card.featured {
    border-color: var(--primary);
    border-width: 2px;
}

.report-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--gray-100);
}

.report-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-icon svg {
    width: 20px;
    height: 20px;
}

.report-icon.pdf {
    background: #fee2e2;
    color: #dc2626;
}

.report-icon.excel {
    background: #dcfce7;
    color: #16a34a;
}

.report-icon.attention {
    background: #fef3c7;
    color: #d97706;
}

.report-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-badge.featured-badge {
    background: var(--primary-light);
    color: var(--primary);
}

.report-badge.danger-badge {
    background: #fee2e2;
    color: #dc2626;
}

.report-card-body {
    padding: var(--spacing-md);
    flex: 1;
}

.report-card-body h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 var(--spacing-sm) 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.report-card-body p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.5;
}

.report-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.report-format-badges {
    display: flex;
    gap: 4px;
}

.format-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
}

.format-badge.pdf {
    background: #fee2e2;
    color: #dc2626;
}

.format-badge.excel {
    background: #dcfce7;
    color: #16a34a;
}

/* Service Lines (compact-list-page) filter widths */
.compact-list-page .filter-group.filter-customer {
    flex: 0 1 300px !important;
    min-width: 80px !important;
}

.compact-list-page .filter-group.filter-site {
    flex: 0 1 600px !important;
    min-width: 100px !important;
}

.compact-list-page .filter-group.filter-discipline {
    flex: 0 1 350px !important;
    min-width: 80px !important;
}

.compact-list-page .filter-group.filter-status {
    flex: 0 1 150px !important;
    min-width: 80px !important;
}

.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--surface-card);
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-toggle-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

/* Customer Logo Banner */
.customer-logo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg) var(--spacing-xl);
    background: var(--surface-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.logo-pair {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.brand-logo, .customer-logo {
    max-height: 50px;
    max-width: 140px;
    object-fit: contain;
}

.logo-divider {
    font-size: 28px;
    color: #ddd;
    font-weight: 300;
}

.customer-name h1 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-800);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Health Strip */
.health-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.health-card {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-card);
    border-left: 4px solid var(--gray-300);
    transition: transform 0.2s, box-shadow 0.2s;
}

.health-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.health-card.status-good {
    border-left-color: var(--success-color);
}

.health-card.status-warning {
    border-left-color: #f59e0b;
}

.health-card.status-danger {
    border-left-color: var(--danger-color);
    background: #fef2f2;
}

.health-card.status-critical {
    border-left-color: #7f1d1d;
    background: #fef2f2;
}

.health-card.status-info {
    border-left-color: var(--info-color);
}

.health-card.status-late {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.health-card.status-late .health-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.health-card.status-remediation {
    border-left-color: #f59e0b;
    background: repeating-linear-gradient(
        45deg,
        #fffbeb,
        #fffbeb 4px,
        #fef3c7 4px,
        #fef3c7 8px
    );
}

.health-card.status-remediation .health-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.health-card.status-missing-paperwork {
    border-left-color: #dc2626;
    background: repeating-linear-gradient(
        -45deg,
        #fef2f2,
        #fef2f2 4px,
        #fecaca 4px,
        #fecaca 8px
    );
}

.health-card.status-missing-paperwork .health-icon {
    background: #fee2e2;
    color: #dc2626;
}

.health-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gray-100);
    margin-bottom: 8px;
}

.health-card.status-good .health-icon {
    background: #dcfce7;
    color: var(--success-color);
}

.health-card.status-danger .health-icon,
.health-card.status-critical .health-icon {
    background: #fee2e2;
    color: var(--danger-color);
}

.health-card.status-info .health-icon {
    background: #e0f2fe;
    color: var(--info-color);
}

.health-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-800);
    line-height: 1.2;
}

.health-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

.health-sub {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.rem-mini-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.rem-mini-badge.cr {
    background: #fee2e2;
    color: #dc2626;
}

.rem-mini-badge.rec {
    background: #e0f2fe;
    color: #0369a1;
}

/* Filter Bar - Collapsible - Modern Professional Design */
.filter-bar {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: visible;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 9999;
}

.filter-bar-content {
    position: relative;
    z-index: 9999;
}

.filter-bar .filter-inline {
    position: relative;
    z-index: 9999;
}

.filter-bar .filter-group {
    position: relative;
    z-index: 9999;
}

.filter-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border-radius: 12px 12px 0 0;
}

.filter-bar-header:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.filter-bar-title {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--navy-800);
}

.filter-toggle-icon {
    transition: transform 0.3s ease;
    color: var(--gray-500);
}

.filter-bar.collapsed .filter-toggle-icon {
    transform: rotate(-90deg);
}

.filter-bar.collapsed {
    border-radius: 12px;
}

.filter-bar-content {
    padding: 16px 20px;
    background: transparent;
}

.filter-bar.collapsed .filter-bar-content {
    display: none;
}

.filter-inline {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: flex-end;
    width: 100%;
}

.filter-inline .filter-group {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
}

.filter-inline .filter-group.filter-flex {
    flex: 1 1 0;
    min-width: 0;
}

.filter-inline .filter-group.filter-wide {
    flex: 2 1 0;
    min-width: 0;
}

.filter-inline .filter-group.filter-narrow {
    flex: 0.8 1 0;
    min-width: 0;
}

.filter-inline .filter-group.filter-customer {
    flex: 1 1 0;
    min-width: 120px;
}

.filter-inline .filter-group.filter-site {
    flex: 2 1 0;
    min-width: 150px;
}

.filter-inline .filter-group.filter-discipline {
    flex: 2 1 0;
    min-width: 0;
}

.filter-inline .filter-group.filter-status {
    flex: 1.2 1 0;
    min-width: 0;
}

.filter-inline .filter-group.filter-month {
    flex: 1.2 1 0;
    min-width: 0;
}

.filter-inline .filter-group.filter-year {
    flex: 0 0 100px;
    min-width: 80px;
}

.filter-inline .btn {
    margin-top: 18px;
    flex-shrink: 0;
}

.filter-inline .filter-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-inline .filter-group .searchable-display {
    height: 36px;
    padding: 0 28px 0 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 36px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.filter-inline .filter-group select {
    width: 100%;
    padding: 0 28px 0 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: inherit;
    background: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    position: relative;
    z-index: 1000;
    height: 36px;
    line-height: 36px;
    color: var(--gray-800);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.filter-inline .filter-group select:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.filter-inline .filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

.filter-inline .filter-group input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    background: white;
    height: 40px;
    color: var(--gray-800);
    box-sizing: border-box;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.filter-inline .filter-group input[type="date"]:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.filter-inline .filter-group input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

.filter-inline .filter-group.filter-date {
    flex: 1.5 1 0;
    min-width: 0;
}

/* Apply Button - Styled */
.filter-inline .btn,
.filter-inline .btn.btn-primary,
.filter-inline .btn.btn-sm {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 14px !important;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(185, 28, 28, 0.2);
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
    white-space: nowrap;
}

.filter-inline .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(185, 28, 28, 0.25);
}

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

.filter-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e8eef4 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.filter-summary-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-summary-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-chip {
    background: white;
    border: 1px solid rgba(185, 28, 28, 0.2);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-summary-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.filter-stat {
    font-size: 0.8rem;
    color: var(--gray-600);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-stat::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray-400);
}

.filter-stat.success::before {
    background: var(--success-color);
}

.filter-stat.danger::before {
    background: var(--danger-color);
}

.filter-stat.success {
    color: var(--success);
}

.filter-stat.danger {
    color: var(--danger);
}

.sites-limited-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    font-size: 0.85rem;
    color: #92400e;
}

.sites-limited-notice svg {
    flex-shrink: 0;
    color: #f59e0b;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid var(--gray-200);
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    background: white;
    color: var(--navy-800);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn.disabled {
    color: var(--gray-400);
    cursor: not-allowed;
    background: var(--gray-100);
}

.pagination-current {
    padding: 0 12px;
    font-size: 0.85rem;
    color: var(--gray-700);
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
}

.grid-main {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.grid-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Dashboard Cards */
.dashboard-card {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.card-header h3 {
    margin: 0;
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--navy-800);
}

.card-subtitle {
    font-size: var(--font-sm);
    color: var(--gray-500);
}

.card-footer {
    padding: var(--spacing-sm) var(--spacing-lg);
    text-align: center;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.card-footer a {
    font-size: var(--font-sm);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.card-footer a:hover {
    text-decoration: underline;
}

/* Action Center */
.action-center .action-list {
    padding: var(--spacing-sm);
}

.action-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
    transition: background 0.2s;
}

.action-item:last-child {
    margin-bottom: 0;
}

.action-item.action-overdue {
    background: #fef2f2;
    border-left: 3px solid var(--danger-color);
}

.action-item.action-warning {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
}

.action-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.action-overdue .action-icon {
    background: #fee2e2;
    color: var(--danger-color);
}

.action-warning .action-icon {
    background: #fef3c7;
    color: #d97706;
}

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

.action-title {
    font-size: var(--font-base);
    font-weight: 600;
    color: var(--navy-800);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.action-subtitle {
    font-size: var(--font-sm);
    color: var(--gray-500);
}

.action-more {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: center;
}

.action-more a {
    font-size: var(--font-sm);
    color: var(--primary-color);
    text-decoration: none;
}

/* Needs Attention Card */
.needs-attention {
    margin-top: var(--spacing-md);
}

.attention-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.attention-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.15s;
}

.attention-item:hover {
    background: var(--gray-50);
}

.attention-item.attention-overdue {
    border-left: 3px solid var(--danger-color);
}

.attention-item.attention-warning {
    border-left: 3px solid #f59e0b;
}

.attention-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.attention-overdue .attention-icon {
    color: var(--danger-color);
}

.attention-warning .attention-icon {
    color: #d97706;
}

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

.attention-title {
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--navy-800);
}

.attention-sub {
    font-size: 0.7rem;
    color: var(--gray-500);
}

.attention-empty {
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--gray-400);
    font-size: var(--font-sm);
}

.tag-statutory-sm {
    display: inline-block;
    padding: 1px 4px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 600;
}

/* Tab badge for counts */
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger-color);
    color: white;
    border-radius: 9px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 6px;
}

/* Needs Attention Panel (Tab) */
.attention-panel {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    padding: var(--spacing-md) 0;
}

.attention-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.attention-section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
}

.attention-section-header h3 {
    margin: 0;
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--navy-800);
}

.attention-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
}

.attention-card {
    display: block;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.attention-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.attention-card.attention-overdue {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.attention-card.attention-late {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.attention-card.attention-due {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.attention-card.attention-remediation {
    background: repeating-linear-gradient(
        45deg,
        #fffbeb,
        #fffbeb 4px,
        #fef3c7 4px,
        #fef3c7 8px
    );
    border: 1px solid #f59e0b;
}

.attention-card.attention-missing-paperwork {
    background: repeating-linear-gradient(
        -45deg,
        #fef2f2,
        #fef2f2 4px,
        #fecaca 4px,
        #fecaca 8px
    );
    border: 1px solid #dc2626;
}

.attention-card.attention-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.attention-card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.attention-logo {
    height: 20px;
    max-width: 60px;
    object-fit: contain;
    margin-right: auto;
}

.attention-days {
    font-size: var(--font-sm);
    font-weight: 700;
    color: var(--danger-color);
}

.attention-card-title {
    font-size: var(--font-base);
    font-weight: 600;
    color: var(--navy-800);
    margin-bottom: 2px;
}

.attention-card-sub {
    font-size: var(--font-sm);
    color: var(--gray-600);
}

.attention-card-customer {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-top: 4px;
}

.attention-empty-section {
    grid-column: 1 / -1;
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--gray-400);
    font-size: var(--font-base);
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

.badge-info {
    background: #3b82f6;
    color: white;
}

/* Remediation attention card */
.attention-card.attention-remediation {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

/* Sign-off attention card */
.attention-card.attention-signoff {
    background: #fffbeb;
    border: 1px solid #fcd34d;
}

.attention-card-desc {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 4px;
    line-height: 1.3;
}

.rem-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.rem-badge.rem-compliance_required {
    background: #fee2e2;
    color: #dc2626;
}

.rem-badge.rem-recommendation {
    background: #fef3c7;
    color: #d97706;
}

/* Tags and Badges */
.tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tag-statutory {
    background: #fef3c7;
    color: #92400e;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-danger {
    background: #fee2e2;
    color: var(--danger-color);
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #e0f2fe;
    color: #075985;
}

/* Site Compliance Grid */
.site-table {
    padding: var(--spacing-sm);
}

.site-table-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.site-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
}

.site-row:hover {
    background: var(--gray-50);
}

.site-row:last-child {
    border-bottom: none;
}

.site-name span {
    font-size: var(--font-base);
    font-weight: 500;
    color: var(--navy-800);
    display: block;
}

.site-name small {
    font-size: var(--font-sm);
    color: var(--gray-500);
}

.site-progress {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.fill-good {
    background: var(--success-color);
}

.progress-fill.fill-warning {
    background: #f59e0b;
}

.progress-fill.fill-danger {
    background: var(--danger-color);
}

.progress-text {
    font-size: var(--font-sm);
    color: var(--gray-500);
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Timeline */
.timeline-list {
    padding: var(--spacing-sm);
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.2s;
    margin-bottom: var(--spacing-xs);
}

.timeline-item:hover {
    background: var(--gray-50);
}

.timeline-date {
    width: 44px;
    height: 44px;
    background: var(--gray-100);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-date .day {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy-800);
    line-height: 1;
}

.timeline-date .month {
    font-size: 0.65rem;
    color: var(--gray-500);
    text-transform: uppercase;
}

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

.timeline-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--navy-800);
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-subtitle {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-arrow {
    color: var(--gray-400);
    flex-shrink: 0;
}

/* Activity List */
.activity-list {
    padding: 8px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
    margin-bottom: 4px;
}

.activity-item:hover {
    background: var(--gray-50);
}

.activity-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.icon-success {
    background: #dcfce7;
    color: var(--success-color);
}

.activity-icon.icon-warning {
    background: #fef3c7;
    color: #d97706;
}

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

.activity-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--navy-800);
}

.activity-subtitle {
    font-size: 0.7rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-date {
    font-size: 0.7rem;
    color: var(--gray-500);
    white-space: nowrap;
}

/* Stats Summary */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background: var(--gray-50);
    border-radius: 6px;
}

.stat-item .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    display: block;
}

.stat-item .stat-label {
    font-size: 0.7rem;
    color: var(--gray-500);
}

/* Service Agreements */
.sa-list {
    padding: 8px;
}

.sa-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid var(--gray-100);
}

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

.sa-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--navy-800);
}

.sa-logo {
    height: 20px;
    max-width: 50px;
    object-fit: contain;
}

/* Empty State */
.empty-state {
    padding: 24px;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .health-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .health-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .health-card {
        padding: 12px;
    }
    
    .health-value {
        font-size: 1.5rem;
    }
    
    .filter-inline {
        flex-direction: column;
    }
    
    .filter-inline .filter-group {
        max-width: 100%;
    }
    
    .customer-logo-banner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .site-table-header,
    .site-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .site-table-header span:first-child,
    .site-row .site-name {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .health-strip {
        grid-template-columns: 1fr;
    }
}

/* Document Library - Compact Design */
.document-library-compact {
    max-width: 1400px;
    margin: 0 auto;
}

.document-library-compact .page-header-block {
    margin-bottom: 20px;
}

.document-library-compact .page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doc-tabs-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 12px;
    justify-content: flex-start;
}

.doc-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    white-space: nowrap;
}

.doc-tab:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

.doc-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.doc-tab.active .tab-icon {
    color: white;
}

.doc-tab.active .tab-count {
    background: rgba(255,255,255,0.25);
    color: white;
}

.tab-icon {
    width: 16px;
    height: 16px;
    color: var(--gray-500);
}

.tab-icon svg {
    width: 100%;
    height: 100%;
}

.tab-label {
    white-space: nowrap;
}

.tab-count {
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-600);
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    display: inline-block;
}

.doc-panel {
    display: none;
}

.doc-panel.active {
    display: block;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.doc-tile {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: visible;
    transition: all 0.15s ease;
    position: relative;
}

.doc-tile:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(175, 9, 37, 0.1);
}

.doc-tile-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    text-decoration: none;
    color: inherit;
}

.doc-tile-icon {
    position: relative;
    width: 40px;
    height: 48px;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.doc-tile-icon svg {
    width: 100%;
    height: 100%;
}

.doc-type-badge {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    font-weight: 700;
    background: var(--primary-color);
    color: white;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.doc-tile-name {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gray-700);
    text-align: center;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.6em;
}

.doc-tile-category {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--gray-500);
    text-align: center;
    margin-top: 4px;
    padding: 2px 6px;
    background: var(--gray-100);
    border-radius: 3px;
}

.doc-tile-actions {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.doc-action-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: white;
    border-radius: 4px;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.doc-action-btn:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.doc-action-delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--gray-700);
}

@media (max-width: 768px) {
    .document-library-compact .page-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .doc-tabs-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 16px;
    }
    
    .doc-tab {
        flex-shrink: 0;
    }
    
    .doc-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 480px) {
    .doc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tab-label {
        display: none;
    }
}

/* Services Library - Compact Design */
.services-library-compact {
    background: var(--surface-card);
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.svc-lib-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.svc-lib-header h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy-800);
    margin: 0;
}

.svc-lib-header p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 2px 0 0 0;
}

.svc-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.svc-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-600);
}

.svc-tab:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

.svc-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.svc-tab.active svg {
    color: white;
}

.svc-tab.active .tab-count {
    background: rgba(255,255,255,0.25);
    color: white;
}

.svc-tab svg {
    color: var(--gray-500);
}

.svc-panel {
    display: none;
}

.svc-panel.active {
    display: block;
}

.svc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.svc-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    text-decoration: none;
    color: var(--gray-800);
    transition: all 0.15s ease;
    position: relative;
    text-align: center;
}

.svc-tile:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(175, 9, 37, 0.1);
}

.svc-tile.active {
    border-color: #10b981;
    background: #f0fdf4;
}

.svc-tile-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
    color: var(--gray-500);
}

.svc-tile-icon svg {
    width: 100%;
    height: 100%;
}

.svc-tile-name {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gray-700);
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.svc-statutory-badge {
    margin-top: 6px;
    font-size: 0.6rem;
    padding: 2px 5px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 3px;
    font-weight: 600;
}

.svc-active-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.quote-panel-content {
    max-width: 800px;
}

.quote-intro {
    margin-bottom: 16px;
}

.quote-intro h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 4px 0;
}

.quote-intro p {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin: 0;
}

.quote-form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quote-form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quote-field {
    display: flex;
    flex-direction: column;
    min-width: 140px;
    flex: 1;
}

.quote-field-wide {
    flex: 2;
    min-width: 200px;
}

.quote-field-full {
    flex: 100%;
}

.quote-field label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.quote-form-grid input,
.quote-form-grid select,
.quote-form-grid textarea {
    padding: 8px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 5px;
    font-size: 0.85rem;
}

.quote-form-grid input:focus,
.quote-form-grid select:focus,
.quote-form-grid textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.quote-form-grid select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.quote-form-grid input[type="file"] {
    font-size: 0.75rem;
    padding: 6px;
}

.quote-form-actions {
    margin-top: 4px;
}

@media (max-width: 768px) {
    .svc-lib-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .svc-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .quote-form-row {
        flex-direction: column;
    }
    
    .quote-field {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .svc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .svc-tab span:not(.tab-count) {
        display: none;
    }
}

/* Services Library v2 - Compact Professional Design */
.svc-container {
    background: var(--surface-card);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.svc-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
    border-bottom: 1px solid var(--gray-200);
}

.svc-title-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.svc-title-area h1 {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.svc-count-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 10px;
    font-weight: 500;
}

.svc-nav-tabs {
    display: flex;
    gap: 4px;
}

.svc-nav-tab {
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
}

.svc-nav-tab:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.svc-nav-tab.active {
    background: white;
    color: var(--navy-800);
}

.svc-content {
    padding: 12px;
}

.svc-panel {
    display: none;
}

.svc-panel.active {
    display: block;
}

.svc-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.svc-service-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
    position: relative;
}

.svc-service-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(175, 9, 37, 0.1);
}

.svc-service-card.is-active {
    border-color: #10b981;
    background: #f0fdf4;
}

.svc-card-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--gray-500);
}

.svc-card-icon svg {
    width: 100%;
    height: 100%;
}

.svc-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.svc-card-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.svc-stat-tag {
    font-size: 0.6rem;
    padding: 1px 4px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 2px;
    font-weight: 600;
    width: fit-content;
}

.svc-active-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.svc-empty {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
}

.svc-quote-card {
    max-width: 700px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 16px;
}

.svc-quote-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-100);
}

.svc-quote-header h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 4px 0;
}

.svc-quote-header p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
}

.svc-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.svc-form-field {
    display: flex;
    flex-direction: column;
}

.svc-form-field label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 3px;
}

.svc-form-field input,
.svc-form-field select,
.svc-form-field textarea {
    padding: 7px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.8rem;
    transition: border-color 0.15s ease;
}

.svc-form-field input:focus,
.svc-form-field select:focus,
.svc-form-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.svc-span-2 {
    grid-column: span 2;
}

.svc-span-3 {
    grid-column: span 3;
}

.svc-span-full {
    grid-column: span 4;
}

.svc-drop-zone {
    position: relative;
    border: 2px dashed var(--gray-300);
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    background: var(--gray-50);
    cursor: pointer;
    transition: all 0.2s ease;
}

.svc-drop-zone:hover {
    border-color: var(--primary-color);
    background: #fef2f2;
}

.svc-drop-zone.drag-over {
    border-color: var(--primary-color);
    background: #fef2f2;
    border-style: solid;
}

.svc-drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.svc-drop-zone-icon {
    width: 28px;
    height: 28px;
    margin: 0 auto 6px;
    color: var(--gray-400);
}

.svc-drop-zone.drag-over .svc-drop-zone-icon {
    color: var(--primary-color);
}

.svc-drop-zone-text {
    color: var(--gray-600);
    font-size: 0.75rem;
    margin: 0 0 4px;
}

.svc-drop-zone-text strong {
    color: var(--primary-color);
}

.svc-drop-zone-hint {
    color: var(--gray-400);
    font-size: 0.65rem;
    margin: 0;
}

.svc-drop-zone.has-files .svc-drop-zone-icon,
.svc-drop-zone.has-files .svc-drop-zone-text,
.svc-drop-zone.has-files .svc-drop-zone-hint {
    display: none;
}

.svc-drop-zone-files {
    display: none;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.svc-drop-zone.has-files .svc-drop-zone-files {
    display: flex;
}

.svc-drop-zone-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--gray-200);
    font-size: 0.75rem;
    color: var(--gray-700);
}

.svc-drop-zone-file-item svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.svc-drop-zone-file-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.svc-form-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
}

.svc-submit-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: #b91c1c !important;
    color: white !important;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    opacity: 1 !important;
    visibility: visible !important;
}

.svc-submit-btn svg {
    stroke: white !important;
    flex-shrink: 0;
}

.svc-submit-btn:hover {
    background: #991b1b !important;
    color: white !important;
    opacity: 1 !important;
}

.svc-submit-btn:hover svg {
    stroke: white !important;
}

@media (max-width: 768px) {
    .svc-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .svc-services-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .svc-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .svc-span-2 {
        grid-column: span 2;
    }
    
    .svc-span-full {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .svc-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .svc-form-grid {
        grid-template-columns: 1fr;
    }
    
    .svc-span-2,
    .svc-span-full {
        grid-column: span 1;
    }
}

/* Services Library A-Z List */
.svc-az-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.svc-letter-section {
    margin-top: 8px;
}

.svc-letter-section:first-child {
    margin-top: 0;
}

.svc-letter-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 4px 8px;
    background: var(--gray-50);
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.svc-az-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.12s ease;
    position: relative;
}

.svc-az-item:hover {
    border-color: var(--primary-color);
    background: #fef7f8;
}

.svc-az-item.is-active {
    border-color: #10b981;
    background: #f0fdf4;
}

.svc-az-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--gray-500);
}

.svc-az-icon svg {
    width: 100%;
    height: 100%;
}

.svc-az-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-800);
    flex: 1;
}

/* Services Library v2 - Standard Header */
.svc-container-v2 {
    background: var(--surface-card);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.svc-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
    justify-content: flex-start;
}

.svc-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
}

.svc-tab-btn:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

.svc-tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-header-block {
    margin-bottom: var(--spacing-lg);
}

.page-header-block h1 {
    margin: 0;
    color: var(--navy-800);
    font-weight: 600;
    font-size: 1.1rem;
}

.page-description {
    margin: 4px 0 0 0;
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* Discipline Detail - Compact Design */
.disc-detail {
    max-width: 800px;
}

.disc-hero {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--surface-card);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 16px;
}

.disc-hero-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.disc-hero-icon svg {
    width: 100%;
    height: 100%;
}

.disc-hero-content h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy-800);
    margin: 0 0 6px 0;
}

.disc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.disc-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.disc-badge.statutory {
    background: #fef3c7;
    color: #92400e;
}

.disc-badge.risk-high {
    background: #fee2e2;
    color: #991b1b;
}

.disc-badge.risk-medium {
    background: #ffedd5;
    color: #9a3412;
}

.disc-badge.risk-low {
    background: #d1fae5;
    color: #065f46;
}

.disc-badge.frequency {
    background: #e0e7ff;
    color: #3730a3;
}

.disc-description {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
}

.disc-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.disc-section {
    background: var(--surface-card);
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.disc-section.disc-primary {
    border-left: 3px solid var(--primary-color);
}

.disc-section h2 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-800);
    margin: 0 0 10px 0;
}

.disc-guidance {
    font-size: 0.85rem;
    color: var(--gray-700);
    line-height: 1.6;
}

.disc-guidance p {
    margin: 0 0 8px 0;
}

.disc-guidance p:last-child {
    margin-bottom: 0;
}

.disc-key-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.disc-info-row {
    display: flex;
    gap: 12px;
    font-size: 0.82rem;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-100);
}

.disc-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.disc-info-label {
    font-weight: 500;
    color: var(--gray-500);
    min-width: 100px;
}

.disc-info-value {
    color: var(--gray-800);
}

.disc-faqs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.disc-faq {
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.disc-faq summary {
    padding: 10px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-800);
    cursor: pointer;
    background: var(--gray-50);
}

.disc-faq summary:hover {
    background: var(--gray-100);
}

.disc-faq p {
    padding: 10px 12px;
    font-size: 0.8rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
    background: white;
}

.disc-resources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.disc-resource-link {
    font-size: 0.8rem;
    padding: 6px 12px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.disc-resource-link:hover {
    background: var(--primary-color);
    color: white;
}

.disc-footer {
    margin-top: 16px;
}

/* Empty category state in document library */
.doc-empty-category {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.doc-empty-category p {
    margin-bottom: 12px;
}

/* Chat Widget Styles */
#chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Public Sans', sans-serif;
}

.chat-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(175, 9, 37, 0.3);
    transition: all 0.2s ease;
    position: relative;
}

.chat-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(175, 9, 37, 0.4);
}

.chat-fab svg {
    width: 26px;
    height: 26px;
    color: white;
}

.chat-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.chat-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

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

.chat-header {
    background: var(--primary-gradient);
    color: white;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-header-info strong {
    font-size: 0.95rem;
}

.chat-header-info small {
    font-size: 0.75rem;
    opacity: 0.85;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.15s;
    line-height: 1;
    padding: 0;
}

.chat-close:hover {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    max-height: 320px;
    min-height: 200px;
    background: var(--gray-50);
}

.chat-loading,
.chat-empty,
.chat-error {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.85rem;
    padding: 20px;
}

.chat-error {
    color: var(--danger-color);
}

.chat-message {
    margin-bottom: 16px;
    max-width: 75%;
    position: relative;
    width: fit-content;
}

.chat-message.own {
    margin-left: 0;
}

.chat-message.other {
    margin-left: 0;
}

.chat-message.system {
    max-width: 85%;
    margin: 20px auto;
    text-align: center;
}

.chat-message.system .chat-message-body {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fbbf24;
    color: #78350f;
    font-size: 0.85rem;
    padding: 14px 18px;
    border-radius: 12px;
    font-style: normal;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.15);
}

.chat-message.system .chat-message-header {
    justify-content: center;
    color: #92400e;
    margin-bottom: 6px;
}

.chat-badge-system {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.chat-message-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 0.7rem;
}

.chat-message-header strong {
    color: var(--gray-400);
    font-weight: 500;
}

.chat-message.own .chat-message-header strong {
    color: var(--gray-400);
}

.chat-badge-helpdesk {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-badge-client {
    background: linear-gradient(135deg, #af0925 0%, #9a1b1b 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-time {
    color: var(--gray-350, #a1a1aa);
    font-size: 0.65rem;
    margin-left: auto;
    opacity: 0.8;
}

.chat-message-body {
    background: white;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--gray-800);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    width: fit-content;
    max-width: 100%;
}

.chat-message.own .chat-message-body {
    background: linear-gradient(135deg, var(--primary-color) 0%, #9a1b1b 100%);
    color: white;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 2px 8px rgba(177, 31, 36, 0.25);
}

.chat-message.own .chat-message-header {
    justify-content: flex-start;
}

.chat-message.own .chat-message-header strong {
    color: var(--gray-600);
}

.chat-message.own .chat-time {
    margin-left: 0;
    margin-right: auto;
}

.chat-message.other .chat-message-body {
    background: white;
    border-radius: 16px 16px 16px 4px;
    border: 1px solid var(--gray-200);
}

.chat-message.helpdesk .chat-message-body {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: var(--gray-800);
    border: 1px solid #94a3b8;
    box-shadow: 0 2px 8px rgba(30, 41, 59, 0.12);
}

.chat-message.client .chat-message-body {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: var(--gray-800);
    border: 1px solid #f87171;
    box-shadow: 0 2px 8px rgba(175, 9, 37, 0.12);
}

.chat-message.deleted .chat-message-body {
    background: var(--gray-100);
    color: var(--gray-400);
    font-style: italic;
    border: 1px dashed var(--gray-300);
}

/* Branded View Visit button in chat */
.btn-chat-view {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #af0925 0%, #9a1b1b 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(175, 9, 37, 0.25);
}

.btn-chat-view:hover {
    background: linear-gradient(135deg, #9a1b1b 0%, #7f1d1d 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(175, 9, 37, 0.35);
    text-decoration: none;
}

.btn-chat-view svg {
    width: 16px;
    height: 16px;
}

.chat-message-sender {
    font-size: 0.7rem;
    color: var(--gray-400);
    font-weight: 500;
    margin-bottom: 4px;
    text-align: left;
}

.chat-message-time {
    font-size: 0.65rem;
    color: var(--gray-400);
    margin-top: 4px;
    opacity: 0.7;
    text-align: left;
}

.chat-message-actions {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    gap: 4px;
}

.chat-message:hover .chat-message-actions {
    display: flex;
}

.chat-action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
}

.chat-action-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.chat-edited-badge {
    font-size: 0.7rem;
    color: var(--gray-400);
    font-style: italic;
    margin-left: 4px;
}

.chat-edit-input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-size: 0.85rem;
    resize: none;
    margin-top: 4px;
}

.chat-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.chat-edit-save, .chat-edit-cancel {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    border: none;
}

.chat-edit-save {
    background: var(--primary-color);
    color: white;
}

.chat-edit-cancel {
    background: var(--gray-200);
    color: var(--gray-600);
}

.chat-typing {
    padding: 8px 16px;
    font-size: 0.75rem;
    color: var(--gray-500);
    font-style: italic;
    background: var(--gray-50);
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: white;
    border-top: 1px solid var(--gray-200);
}

.chat-input-area textarea {
    flex: 1;
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 0.85rem;
    resize: none;
    outline: none;
    font-family: inherit;
    max-height: 80px;
}

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

.chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.chat-send:hover {
    background: var(--primary-dark);
}

.chat-send svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Helpdesk Console Styles */
.helpdesk-console {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    height: calc(100vh - 180px);
    min-height: 500px;
}

.helpdesk-sessions {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.helpdesk-sessions-header {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.helpdesk-sessions-header h3 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--gray-800);
}

.helpdesk-sessions-list {
    flex: 1;
    overflow-y: auto;
}

.helpdesk-session-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background 0.15s;
}

.helpdesk-session-item:hover {
    background: var(--gray-50);
}

.helpdesk-session-item.active {
    background: var(--primary-50);
    border-left: 3px solid var(--primary-color);
}

.helpdesk-session-item.unread {
    background: #fffbf0;
}

.helpdesk-session-detail {
    font-size: 0.8rem;
    color: var(--gray-700);
    margin-bottom: 2px;
}

.helpdesk-session-detail strong {
    color: var(--gray-500);
    font-weight: 500;
}

.helpdesk-session-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.helpdesk-session-preview {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.helpdesk-unread-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.helpdesk-chat-area {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.helpdesk-chat-header {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.helpdesk-chat-header h3 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
}

.helpdesk-chat-header small {
    color: var(--gray-500);
    font-size: 0.8rem;
}

.helpdesk-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--gray-50);
}

.helpdesk-chat-input {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--gray-200);
}

.helpdesk-chat-input textarea {
    flex: 1;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    resize: none;
    font-family: inherit;
}

.helpdesk-chat-input .btn {
    align-self: flex-end;
}

.helpdesk-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-500);
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .helpdesk-console {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .helpdesk-sessions {
        max-height: 300px;
    }
}

.ai-analysis-section {
    margin-top: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: var(--radius-lg);
    border: 1px solid #e0e7ff;
}

.ai-analysis-header {
    margin-bottom: 16px;
}

.ai-analysis-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 8px 0;
}

.ai-analysis-header h3 svg {
    color: #6366f1;
}

.ai-analysis-desc {
    color: var(--gray-600);
    font-size: 0.85rem;
    margin: 0;
}

#run-ai-analysis {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #6366f1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

#run-ai-analysis:hover {
    background: #4f46e5;
}

#run-ai-analysis:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
}

.ai-analysis-result {
    margin-top: 20px;
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--gray-200);
}

.ai-analysis-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.ai-analysis-header-result {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #059669;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.ai-analysis-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--gray-700);
}

.ai-analysis-text h1, .ai-analysis-text h2, .ai-analysis-text h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 16px 0 8px 0;
}

.ai-analysis-text ul, .ai-analysis-text ol {
    margin: 12px 0;
    padding-left: 24px;
}

.ai-analysis-text li {
    margin-bottom: 8px;
}

.ai-analysis-text strong {
    color: var(--gray-800);
}

.ai-analysis-disclaimer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
    font-size: 0.8rem;
    color: var(--gray-500);
    font-style: italic;
}

.ai-analysis-error {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #dc2626;
    font-size: 0.9rem;
}

.ai-analysis-error svg {
    flex-shrink: 0;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* AI Analysis Overview Section */
.ai-analysis-overview {
    margin-top: 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #86efac;
    border-radius: 12px;
    padding: 20px;
}

.ai-analysis-header-overview {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #16a34a;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(134, 239, 172, 0.5);
}

.ai-analysis-header-overview svg {
    flex-shrink: 0;
}

.ai-analysis-overview-content {
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.6;
}

.ai-analysis-overview-content h1,
.ai-analysis-overview-content h2,
.ai-analysis-overview-content h3 {
    color: var(--gray-800);
    font-size: 1rem;
    margin: 16px 0 8px 0;
    font-weight: 600;
}

.ai-analysis-overview-content h1:first-child,
.ai-analysis-overview-content h2:first-child,
.ai-analysis-overview-content h3:first-child {
    margin-top: 0;
}

.ai-analysis-overview-content ul,
.ai-analysis-overview-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.ai-analysis-overview-content li {
    margin-bottom: 6px;
}

.ai-analysis-overview-content strong {
    color: var(--gray-800);
}

.ai-analysis-overview-content p {
    margin: 8px 0;
}

/* Session Timeout Modal */
.session-timeout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.session-timeout-content {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    padding: 32px 40px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.session-timeout-icon {
    margin-bottom: 16px;
    color: var(--warning-color);
}

.session-timeout-icon svg {
    stroke: #f59e0b;
}

.session-timeout-content h3 {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.session-timeout-content p {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: var(--gray-600);
}

#session-countdown {
    font-weight: 700;
    color: var(--danger-color);
    font-size: 1.1rem;
}

.session-timeout-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.session-timeout-buttons .btn {
    padding: 10px 24px;
    font-size: 0.95rem;
}

.session-timeout-buttons .btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
    border: none;
}

.session-timeout-buttons .btn-secondary:hover {
    background: var(--gray-300);
}

/* Help Tooltip Component */
.help-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    cursor: help;
    position: relative;
    margin-left: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}

.help-tooltip:hover {
    background: #d1d5db;
    color: #374151;
}

.help-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    white-space: normal;
    width: max-content;
    max-width: 250px;
    text-align: left;
    line-height: 1.4;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.help-tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 99999;
}

.help-tooltip:hover::after,
.help-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Tooltip positioning variants */
.help-tooltip.tooltip-right::after {
    left: calc(100% + 8px);
    bottom: 50%;
    transform: translateY(50%);
}

.help-tooltip.tooltip-right::before {
    left: calc(100% + 2px);
    bottom: 50%;
    transform: translateY(50%);
    border: 6px solid transparent;
    border-right-color: #1e293b;
    border-top-color: transparent;
}

/* Today's Focus Panel */
.todays-focus {
    margin-bottom: var(--spacing-lg);
}

.todays-focus .card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.todays-focus .card-header h3 {
    margin: 0;
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--navy-800);
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.focus-section {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    border: 1px solid var(--gray-200);
}

.focus-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--gray-200);
}

.focus-header-sub {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--gray-200);
}

.focus-title {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.focus-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 11px;
}

.focus-count.badge-danger {
    background: #dc3545;
    color: white;
}

.focus-count.badge-warning {
    background: #fd7e14;
    color: white;
}

.focus-count.badge-info {
    background: #17a2b8;
    color: white;
}

.focus-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.focus-item {
    display: block;
    padding: var(--spacing-sm);
    background: white;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.focus-item:hover {
    background: var(--gray-100);
    transform: translateX(2px);
}

.focus-item.urgency-danger {
    border-left-color: #dc3545;
}

.focus-item.urgency-warning {
    border-left-color: #fd7e14;
}

.focus-item.urgency-info {
    border-left-color: #17a2b8;
}

.focus-item-main {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.focus-discipline {
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--gray-800);
}

.focus-item-sub {
    font-size: var(--font-xs);
    color: var(--gray-500);
    margin-top: 2px;
}

.focus-empty {
    font-size: var(--font-sm);
    color: var(--gray-400);
    font-style: italic;
    padding: var(--spacing-sm);
    text-align: center;
}

.focus-view-all {
    display: block;
    text-align: center;
    padding: var(--spacing-sm);
    font-size: var(--font-xs);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.focus-view-all:hover {
    text-decoration: underline;
}

.focus-item-hidden,
.site-row-hidden,
.action-item-hidden {
    display: none !important;
}

.focus-list.expanded .focus-item-hidden,
.site-table.expanded .site-row-hidden,
.action-list.expanded .action-item-hidden {
    display: flex !important;
}

.site-table.expanded .site-row-hidden {
    display: grid !important;
}

.focus-section {
    align-self: start;
}

.focus-list {
    max-height: none;
}

.focus-list.expanded {
    max-height: none;
}

button.focus-toggle,
button.site-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

button.focus-toggle:focus,
button.site-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.tag.tag-sm {
    font-size: 0.6rem;
    padding: 1px 5px;
}

/* Focus Panel Responsive */
@media (max-width: 1200px) {
    .focus-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Manager Compliance Overview */
.manager-overview {
    margin-bottom: var(--spacing-lg);
}

.manager-overview .card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.manager-overview .card-header h3 {
    margin: 0;
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--navy-800);
}

.manager-overview .card-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.manager-overview .card-header-actions .btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-card-header {
    margin-bottom: 12px;
}

.chart-card-header h4 {
    margin: 0;
}

.chart-subtitle {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.chart-container {
    position: relative;
    width: 100%;
}

.manager-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.chart-card {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    min-height: 280px;
}

.chart-card h4 {
    margin: 0 0 var(--spacing-md) 0;
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

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

.chart-card.at-risk-sites {
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.at-risk-list {
    flex: 1;
    overflow-y: auto;
    max-height: 220px;
}

.at-risk-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-xs);
    background: white;
    border-left: 3px solid var(--gray-300);
    transition: all 0.15s ease;
}

.at-risk-item:hover {
    box-shadow: var(--shadow-hover);
}

.at-risk-item.risk-critical {
    border-left-color: var(--danger-color);
    background: var(--primary-50);
}

.at-risk-item.risk-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.at-risk-info {
    flex: 1;
    min-width: 0;
}

.at-risk-site {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--navy-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.at-risk-customer {
    font-size: var(--font-xs);
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.at-risk-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.at-risk-percent {
    font-size: var(--font-sm);
    font-weight: 700;
}

.at-risk-overdue {
    font-size: var(--font-xs);
    color: var(--danger-color);
    font-weight: 500;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: #f59e0b !important;
}

.text-success {
    color: var(--success-color) !important;
}

/* Compliance Table Card Styles */
.compliance-table-card {
    display: flex;
    flex-direction: column;
}

.compliance-table-scroll {
    max-height: 240px;
    overflow-y: auto;
    border-radius: var(--radius-sm);
}

.compliance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-sm);
}

.compliance-table thead th {
    position: sticky;
    top: 0;
    background: var(--gray-50);
    color: var(--gray-600);
    padding: 4px 6px;
    text-align: left;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--gray-200);
    line-height: 1.2;
    height: 24px;
    z-index: 1;
}

.compliance-table tbody tr {
    background: white;
    border-bottom: 1px solid var(--gray-100);
}

.compliance-table tbody tr:hover {
    background: var(--gray-50);
}

.compliance-table td {
    padding: 4px 6px;
    color: var(--gray-700);
    font-size: 11px;
    line-height: 1.2;
    height: 28px;
}

.compliance-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
    min-width: 44px;
}

/* Manager Overview Responsive */
@media (max-width: 1200px) {
    .manager-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .manager-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card {
        min-height: 240px;
    }
    
    .chart-card canvas {
        max-height: 180px;
    }
}

/* Dashboard Tabs */
.dashboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
    justify-content: flex-start;
}

.dashboard-tabs .dashboard-tab {
    min-width: 160px;
    justify-content: center;
}

.dashboard-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
}

.dashboard-tab:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

.dashboard-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.dashboard-tab .tab-icon {
    width: 16px;
    height: 16px;
    color: var(--gray-500);
}

.dashboard-tab.active .tab-icon {
    color: white;
}

.dashboard-panels {
    margin-top: 16px;
}

.dashboard-panel {
    display: none;
}

.dashboard-panel.active {
    display: block;
}

@media (max-width: 768px) {
    .dashboard-tabs {
        gap: 4px;
    }
    
    .dashboard-tab {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Overview Layout - Flowing Action Items */
.overview-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.overview-sidebar {
    width: 180px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--gray-200);
}

.overview-sidebar .compliance-gauge-container {
    margin-bottom: 16px;
}

.overview-sidebar .compliance-gauge {
    width: 120px;
    height: 120px;
}

.overview-sidebar .gauge-value {
    font-size: 1.8rem;
}

.overview-sidebar .gauge-unit {
    font-size: 1rem;
}

.overview-sidebar .gauge-label {
    font-size: 0.8rem;
    margin-top: 8px;
}

.sidebar-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--gray-200);
    padding-top: 12px;
}

.sidebar-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-stat .stat-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy-800);
}

.sidebar-stat .stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.overview-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-section {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.action-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
}

.action-danger .action-header { background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); }
.action-warning .action-header { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); }
.action-docs .action-header { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); }
.action-remediation .action-header { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); }
.action-due .action-header { background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); }

.action-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy-800);
}

.action-danger .action-title { color: #991b1b; }
.action-warning .action-title { color: #92400e; }
.action-docs .action-title { color: #92400e; }
.action-remediation .action-title { color: #0369a1; }

.action-count {
    background: white;
    color: var(--navy-800);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.action-danger .action-count { background: #dc2626; color: white; }
.action-warning .action-count { background: #f59e0b; color: white; }
.action-docs .action-count { background: #d97706; color: white; }
.action-remediation .action-count { background: #0284c7; color: white; }

.action-items {
    padding: 0;
}

.action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-100);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.action-item:hover {
    background: var(--gray-50);
}

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

.action-item-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.action-site {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--navy-800);
}

.action-discipline {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.action-item-meta {
    text-align: right;
}

.action-days {
    font-weight: 600;
    font-size: 0.8rem;
    color: #dc2626;
}

.action-date {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.action-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.action-badge.badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.action-badge.badge-info {
    background: #e0f2fe;
    color: #0284c7;
}

.action-more {
    display: block;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.8rem;
    color: var(--primary-color);
    text-decoration: none;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.action-more:hover {
    background: var(--gray-100);
}

.all-clear {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: var(--radius-lg);
    border: 1px solid #86efac;
}

.all-clear-icon {
    color: #16a34a;
    margin-bottom: 16px;
}

.all-clear-text {
    font-size: 1rem;
    font-weight: 600;
    color: #166534;
}

@media (max-width: 768px) {
    .overview-layout {
        flex-direction: column;
    }
    
    .overview-sidebar {
        width: 100%;
        flex-direction: row;
        display: flex;
        align-items: center;
        gap: 20px;
    }
    
    .overview-sidebar .compliance-gauge-container {
        margin-bottom: 0;
    }
    
    .sidebar-stats {
        flex: 1;
        flex-direction: row;
        border-top: none;
        border-left: 1px solid var(--gray-200);
        padding-top: 0;
        padding-left: 20px;
    }
}

/* Executive Summary Section */
.executive-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--gray-200);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.exec-hero {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.compliance-gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
}

.compliance-gauge {
    position: relative;
    width: 160px;
    height: 160px;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(0deg);
}

.gauge-bg {
    stroke: var(--gray-200);
}

.gauge-fill {
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s ease-in-out;
}

.gauge-good .gauge-fill {
    stroke: var(--success-color);
}

.gauge-warning .gauge-fill {
    stroke: #f59e0b;
}

.gauge-danger .gauge-fill {
    stroke: var(--danger-color);
}

.gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.gauge-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy-800);
    line-height: 1;
}

.gauge-unit {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-500);
}

.gauge-label {
    margin-top: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    text-align: center;
}

.trend-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.trend-positive {
    background: rgba(41, 179, 95, 0.1);
    color: var(--success-color);
}

.trend-negative {
    background: rgba(175, 9, 37, 0.1);
    color: var(--danger-color);
}

.trend-label {
    font-weight: 400;
    color: var(--gray-500);
    margin-left: 4px;
}

.exec-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.exec-kpi-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

.exec-kpi-card:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.exec-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.exec-kpi-icon svg {
    width: 24px;
    height: 24px;
}

.kpi-success {
    background: rgba(41, 179, 95, 0.1);
    color: var(--success-color);
}

.kpi-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.kpi-danger {
    background: rgba(175, 9, 37, 0.1);
    color: var(--danger-color);
}

.exec-kpi-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.exec-kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-800);
    line-height: 1.1;
}

.exec-kpi-value.text-danger {
    color: var(--danger-color);
}

.exec-kpi-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-top: 4px;
}

.exec-kpi-sub {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
}

.exec-kpi-sub.danger {
    background: rgba(175, 9, 37, 0.1);
    color: var(--danger-color);
}

.exec-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
    flex-wrap: wrap;
    gap: 12px;
}

.exec-report-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.exec-report-btn:hover {
    background: var(--primary-color);
    color: white;
}

.exec-report-btn svg {
    width: 18px;
    height: 18px;
}

.exec-period-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.exec-period-info .divider {
    color: var(--gray-300);
}

.exec-period-info strong {
    color: var(--navy-800);
    font-weight: 600;
}

/* Executive Summary Responsive */
@media (max-width: 1200px) {
    .exec-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .exec-hero {
        flex-direction: column;
        align-items: center;
    }
    
    .compliance-gauge-container {
        width: 100%;
    }
    
    .exec-kpi-grid {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .executive-summary {
        padding: var(--spacing-lg);
    }
    
    .exec-kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .exec-kpi-card {
        padding: 16px;
    }
    
    .exec-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .exec-report-btn {
        justify-content: center;
    }
    
    .exec-period-info {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Print Styles for Executive Summary */
@media print {
    .executive-summary {
        background: white !important;
        border: 2px solid var(--gray-300);
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .exec-kpi-card {
        border: 1px solid var(--gray-300);
        box-shadow: none;
    }
    
    .exec-report-btn {
        display: none;
    }
    
    .gauge-fill {
        stroke-width: 10px;
    }
    
    .exec-hero {
        gap: 24px;
    }
    
    .exec-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* =====================================================
   COMPLIANCE TIMELINE STYLES
   ===================================================== */

.timeline-page {
    animation: fadeIn 0.3s ease-out;
}

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

.timeline-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--gray-200);
}

.timeline-stat {
    flex: 1;
    min-width: 100px;
    text-align: center;
}

.timeline-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy-800);
    line-height: 1.2;
}

.timeline-stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    justify-content: center;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.8rem;
    color: var(--gray-600);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.dot-success { background: var(--success-color); }
.legend-dot.dot-warning { background: #f59e0b; }
.legend-dot.dot-danger { background: var(--danger-color); }
.legend-dot.dot-info { background: var(--info-color); }
.legend-dot.dot-statutory { background: linear-gradient(135deg, var(--info-color), var(--primary-color)); }

.timeline-container {
    padding: var(--spacing-xl) 0;
    overflow-x: auto;
}

.timeline-track {
    display: flex;
    gap: 0;
    min-width: max-content;
    padding: var(--spacing-lg);
}

.timeline-month {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
    position: relative;
    animation: slideInUp 0.5s ease-out backwards;
}

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

.timeline-node {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeline-node:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.timeline-node.node-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #1e8a4a 100%);
}

.timeline-node.node-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.timeline-node.node-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--primary-dark) 100%);
}

.node-score {
    font-size: 0.9rem;
}

.timeline-line {
    position: absolute;
    top: 30px;
    left: 50%;
    width: calc(100% + 0px);
    height: 4px;
    background: var(--gray-200);
    z-index: 1;
}

.timeline-line.active {
    background: linear-gradient(90deg, var(--primary-color), var(--gray-300));
}

.timeline-content {
    margin-top: var(--spacing-lg);
    text-align: center;
    padding: var(--spacing-md);
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    min-width: 120px;
    transition: all 0.2s ease;
}

.timeline-content:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.timeline-month-label {
    font-weight: 600;
    color: var(--navy-800);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.timeline-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.timeline-mini-stat {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.mini-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.mini-dot.dot-success { background: var(--success-color); }
.mini-dot.dot-warning { background: #f59e0b; }
.mini-dot.dot-danger { background: var(--danger-color); }
.mini-dot.dot-info { background: var(--info-color); }

.timeline-badges {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.timeline-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
}

.timeline-badge.badge-statutory {
    background: rgba(42, 115, 158, 0.15);
    color: var(--info-color);
}

.timeline-badge.badge-remediation {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.timeline-bar-container {
    margin-top: var(--spacing-sm);
}

.timeline-bar {
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
}

.bar-segment {
    height: 100%;
    transition: width 0.5s ease;
}

.bar-segment.bar-success { background: var(--success-color); }
.bar-segment.bar-warning { background: #f59e0b; }
.bar-segment.bar-danger { background: var(--danger-color); }
.bar-segment.bar-info { background: var(--info-color); }

.timeline-chart-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    border: 1px solid var(--gray-200);
}

.timeline-chart-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-800);
    margin-bottom: var(--spacing-lg);
}

.timeline-chart-section canvas {
    max-height: 250px;
}

.timeline-notable-section {
    margin-top: var(--spacing-xl);
}

.timeline-notable-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-800);
    margin-bottom: var(--spacing-lg);
}

.notable-visits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.notable-visit-card {
    display: block;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-decoration: none;
    transition: all 0.2s ease;
}

.notable-visit-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.notable-visit-date {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: var(--spacing-xs);
}

.notable-visit-site {
    font-weight: 600;
    color: var(--navy-800);
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.notable-visit-discipline {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: var(--spacing-sm);
}

.notable-visit-badges {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

/* Timeline Mobile Responsive */
@media (max-width: 768px) {
    .timeline-summary-strip {
        gap: var(--spacing-md);
    }
    
    .timeline-stat {
        min-width: 80px;
    }
    
    .timeline-stat-value {
        font-size: 1.4rem;
    }
    
    .timeline-track {
        flex-direction: column;
        align-items: flex-start;
        min-width: auto;
    }
    
    .timeline-month {
        flex-direction: row;
        min-width: 100%;
        gap: var(--spacing-md);
    }
    
    .timeline-node {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }
    
    .timeline-line {
        display: none;
    }
    
    .timeline-content {
        flex: 1;
        text-align: left;
        margin-top: 0;
    }
    
    .timeline-stats {
        justify-content: flex-start;
    }
    
    .timeline-badges {
        justify-content: flex-start;
    }
    
    .notable-visits-grid {
        grid-template-columns: 1fr;
    }
}

/* Timeline Print Styles */
@media print {
    .timeline-page .filter-bar,
    .timeline-page .filter-toggle-btn {
        display: none !important;
    }
    
    .timeline-container {
        overflow: visible;
    }
    
    .timeline-track {
        flex-wrap: wrap;
    }
    
    .timeline-node:hover {
        transform: none;
    }
    
    .timeline-chart-section {
        page-break-inside: avoid;
    }
}

/* =====================================================
   DIGITAL SIGN-OFF STYLES
   ===================================================== */

/* Sign-Off Page Layout */
.sign-off-page {
    padding: 20px;
    max-width: 700px;
    margin: 0 auto;
}

.sign-off-container {
    background: white;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sign-off-page .sign-off-header {
    margin-bottom: 24px;
}

.sign-off-page .sign-off-header h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.sign-off-subtitle {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* Visit Summary Card */
.visit-summary-card {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.visit-summary-card h3 {
    font-size: 0.9rem;
    margin-bottom: 12px;
    color: var(--gray-600);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.summary-item .label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.summary-item .value {
    font-weight: 600;
    color: var(--gray-800);
}

/* Sign-Off Form Card */
.sign-off-form-card {
    background: white;
}

.sign-off-form-card h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 8px;
}

/* Signature Canvas */
.signature-pad-container {
    margin-bottom: 8px;
}

#signatureCanvas {
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    background: white;
    cursor: crosshair;
    display: block;
    max-width: 100%;
    touch-action: none;
}

.signature-hint {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Acknowledgment Group */
.acknowledgment-group {
    background: var(--gray-50);
    padding: 12px;
    border-radius: 6px;
    margin-top: 16px;
}

.acknowledgment-group .checkbox-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
}

.acknowledgment-group input[type="checkbox"] {
    margin-top: 3px;
}

/* Client Feedback Row - Sign-off & Notes side by side */
.client-feedback-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .client-feedback-row {
        grid-template-columns: 1fr;
    }
}

/* Sign-Off Card in Visit Detail */
.sign-off-card {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 12px;
    margin-top: 0;
}

.client-feedback-row .sign-off-card,
.client-feedback-row .client-notes-card {
    margin-top: 0;
}

.sign-off-card .sign-off-header {
    margin-bottom: 8px;
}

/* Sign-Off Status */
.sign-off-status.pending p {
    color: var(--gray-600);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

/* Sign-Off Badge */
.sign-off-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    color: #166534;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Sign-Off Details */
.sign-off-details p {
    margin: 0 0 4px 0;
    font-size: 0.85rem;
}

.sign-off-date {
    color: var(--gray-500);
    font-size: 0.8rem !important;
}

/* Signature Preview */
.signature-preview {
    max-width: 150px;
    height: 50px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    margin: 8px 0;
    background: white;
    object-fit: contain;
}

/* Sign-Off Comments */
.sign-off-comments {
    font-style: italic;
    color: var(--gray-600);
    font-size: 0.8rem !important;
    margin-top: 8px !important;
}

/* Responsive Sign-Off Page */
@media (max-width: 576px) {
    .sign-off-page {
        padding: 12px;
    }
    
    .sign-off-container {
        padding: 16px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    #signatureCanvas {
        width: 100%;
        height: 120px;
    }
}

/* Small Sign-Off Badge for Visit Chips/Cards */
.signoff-badge-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    font-size: 9px;
    font-weight: bold;
    margin-left: 3px;
    flex-shrink: 0;
}

.signoff-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #dcfce7;
    color: #166534;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 4px;
}

.signoff-badge-inline svg {
    width: 10px;
    height: 10px;
}

/* Pending Sign-Off Notification Badge */
.notif-badge-pending-signoff {
    background: #dbeafe;
    color: #1e40af;
}

/* Sign-Off Report Styles */
.signoff-report-page {
    padding: var(--spacing-lg);
}

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

.signoff-table th,
.signoff-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.85rem;
}

.signoff-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--navy-800);
}

.signoff-table tr:hover {
    background: var(--gray-50);
}

.signature-thumbnail {
    max-width: 80px;
    height: 30px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    background: white;
    object-fit: contain;
}

.signoff-comments-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   Activity Log / Audit Log Styles
   ============================================ */
.audit-log-page {
    max-width: 1000px;
    margin: 0 auto;
}

.audit-controls {
    margin-bottom: 1rem;
}

.audit-search-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.search-box svg {
    color: var(--gray-400);
    flex-shrink: 0;
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.85rem;
}

.filter-bar {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.filter-bar.collapsed {
    display: none;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.8rem;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
}

.active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--gray-50);
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.filter-label {
    color: var(--gray-500);
}

.filter-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.filter-count {
    margin-left: auto;
    color: var(--gray-500);
    font-weight: 500;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-entry {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    transition: border-color 0.15s;
}

.activity-entry:hover {
    border-color: var(--gray-300);
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.user { background: #dbeafe; color: #2563eb; }
.activity-icon.customer { background: #fef3c7; color: #d97706; }
.activity-icon.site { background: #d1fae5; color: #059669; }
.activity-icon.visit { background: #e0e7ff; color: #4f46e5; }
.activity-icon.document { background: #fce7f3; color: #db2777; }
.activity-icon.report { background: #f3e8ff; color: #9333ea; }
.activity-icon.ai { background: #cffafe; color: #0891b2; }
.activity-icon.communication { background: #fee2e2; color: #dc2626; }
.activity-icon.system { background: var(--gray-100); color: var(--gray-600); }

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

.activity-main {
    font-size: 0.85rem;
    line-height: 1.4;
}

.activity-user {
    font-weight: 600;
    color: var(--gray-800);
}

.activity-action {
    color: var(--gray-600);
}

.activity-entity {
    color: var(--primary-color);
}

.activity-entity a {
    color: var(--primary-color);
    text-decoration: none;
}

.activity-entity a:hover {
    text-decoration: underline;
}

.activity-details {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--gray-500);
    background: var(--gray-50);
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    word-break: break-word;
}

.activity-signatory {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: #0d9488;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.activity-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    flex-shrink: 0;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
}

.activity-ip {
    font-size: 0.7rem;
    color: var(--gray-400);
    font-family: monospace;
}

.audit-log-page .empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}

.audit-log-page .empty-state svg {
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.audit-log-page .empty-state h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--gray-700);
}

.audit-log-page .empty-state p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.btn-outline {
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

@media (max-width: 640px) {
    .audit-search-row {
        flex-direction: column;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .activity-entry {
        flex-direction: column;
    }
    
    .activity-meta {
        flex-direction: row;
        align-items: center;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--gray-100);
    }
    
    .activity-icon {
        width: 28px;
        height: 28px;
    }
}

/* Standard Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.new-chat-search {
    margin-bottom: 16px;
}

.new-chat-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.new-chat-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(175, 9, 37, 0.1);
}

.new-chat-results {
    max-height: 350px;
    overflow-y: auto;
}

.new-chat-hint,
.new-chat-loading {
    text-align: center;
    padding: 20px;
    color: var(--gray-500);
    font-size: 0.85rem;
}

.new-chat-result-item {
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.new-chat-result-item.compact {
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: var(--radius-sm);
}

.new-chat-result-item:hover {
    border-color: var(--primary-color);
    background: var(--gray-50);
}

.new-chat-result-item .result-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.85rem;
}

.new-chat-result-item .result-customer {
    font-weight: 600;
    color: var(--gray-900);
}

.new-chat-result-item .result-site {
    font-weight: 500;
    color: var(--gray-800);
}

.new-chat-result-item .result-discipline {
    color: var(--gray-600);
}

.new-chat-result-item .result-sep {
    color: var(--gray-300);
    font-size: 0.75rem;
}

.new-chat-result-item .result-due {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin-left: auto;
}

.new-chat-result-item .result-job-id {
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.new-chat-result-job {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.new-chat-result-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.new-chat-result-details span {
    display: inline-flex;
    align-items: center;
}

.new-chat-result-details span:not(:last-child)::after {
    content: "•";
    margin-left: 8px;
    color: var(--gray-400);
}

/* ====== Drilldown Grid (Audit Centre) ====== */
.drilldown-grid-section {
    margin-top: 1.5rem;
}

.drilldown-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.drilldown-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1.25rem;
}

.drilldown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.drilldown-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.drilldown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.drilldown-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.drilldown-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.drilldown-card-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gray-100);
}

.drilldown-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.drilldown-card-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--primary-light);
}

.drilldown-card-info {
    flex: 1;
    min-width: 0;
}

.drilldown-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drilldown-card-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.drilldown-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.drilldown-stat.stat-danger {
    color: var(--danger-color);
}

.drilldown-card-total {
    flex-shrink: 0;
}

.total-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
}

.total-badge.badge-danger {
    background: var(--danger-light, #fee2e2);
    color: var(--danger-color);
}

.total-badge.badge-warning {
    background: var(--warning-light, #fef3c7);
    color: var(--warning-color);
}

.total-badge.badge-info {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* Back button */
.drilldown-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    color: var(--gray-700);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.drilldown-back-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

/* Responsive */
@media (max-width: 768px) {
    .drilldown-grid {
        grid-template-columns: 1fr;
    }
    
    .drilldown-card {
        padding: 0.875rem;
    }
    
    .drilldown-card-logo {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   EMAIL ADMIN PAGES - Centralized Styles
   ============================================ */

/* Page Header with Subtitle */
.page-title-row .page-subtitle {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin: 4px 0 0 0;
    font-weight: 400;
}

/* Email Tabs */
.email-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 0;
}

.email-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: none;
    border: none;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s ease;
}

.email-tab:hover {
    color: var(--gray-700);
}

.email-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.email-tab svg {
    flex-shrink: 0;
}

.email-tab-content {
    display: none;
}

.email-tab-content.active {
    display: block;
}

/* Email Stats Cards */
.email-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.email-stat-card {
    padding: 14px;
    border-radius: 8px;
    text-align: center;
    color: white;
}

.email-stat-card.stat-success { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.email-stat-card.stat-danger { background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%); }
.email-stat-card.stat-info { background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%); }
.email-stat-card.stat-purple { background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%); }

.email-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.email-stat-card .stat-label {
    font-size: 0.7rem;
    opacity: 0.9;
    margin-top: 2px;
}

/* Email Charts */
.email-charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

.email-chart-card {
    background: var(--surface-card);
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.06);
}

.email-chart-card.chart-main {
    max-height: 160px;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.type-stats-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.type-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.type-stat-name {
    color: var(--text-secondary);
}

.type-stat-count {
    font-weight: 600;
    color: var(--text-primary);
}

/* Email Log Table */
.email-log-table {
    table-layout: fixed;
}

.email-log-table th,
.email-log-table td {
    font-size: 0.75rem;
    padding: 8px 10px;
}

.email-log-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-date {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
}

.log-time {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.recipient-cell {
    max-width: 200px;
}

.details-cell {
    max-width: 180px;
}

/* Action Badges */
.action-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    background-color: var(--gray-100);
    color: var(--gray-700);
}

.action-badge.action-digest { background: #ede9fe; color: #7c3aed; }
.action-badge.action-deadline { background: #fef3c7; color: #d97706; }
.action-badge.action-completion { background: #cffafe; color: #0891b2; }
.action-badge.action-test { background: #e5e7eb; color: #6b7280; }

/* Send Cards */
.send-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.send-card {
    background: var(--surface-card);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.06);
}

.send-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-800);
}

.send-card-title svg {
    flex-shrink: 0;
}

.send-card-desc {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

/* Compact Form Groups */
.form-group.compact {
    margin-bottom: 12px;
}

.form-group.compact label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.form-group.compact .form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Admin Section Titles */
.admin-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy-800);
}

.admin-section-desc {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin: 0 0 12px 0;
}

/* Email Settings */
.settings-section {
    max-width: 700px;
}

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

.settings-card {
    background: var(--surface-card);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.06);
}

.settings-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy-800);
}

.settings-card-title svg {
    flex-shrink: 0;
    color: var(--primary-color);
}

.settings-description {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.settings-row {
    margin-bottom: 14px;
}

.settings-row:last-child {
    margin-bottom: 0;
}

.settings-row.settings-inline {
    display: flex;
    gap: 16px;
}

.settings-field {
    flex: 1;
}

.settings-field label:not(.toggle-label) {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.settings-field .form-select,
.settings-field .form-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.8rem;
    background: white;
}

.settings-field .form-select-sm,
.settings-field .form-input-sm {
    padding: 6px 10px;
    font-size: 0.75rem;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.7rem;
    color: var(--gray-400);
}

/* Toggle Switch */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--gray-700);
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background-color: var(--gray-300);
    border-radius: 22px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::after {
    transform: translateX(18px);
}

.settings-actions {
    padding-top: 8px;
}

.settings-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Admin Content Sections */
.admin-content-section {
    margin-bottom: 24px;
}

/* Digest Table */
.digest-table .actions-column {
    width: 160px;
    text-align: center;
}

.digest-table .action-cell {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.inline-form {
    display: inline;
}

/* Extra Small Buttons */
.btn-xs {
    font-size: 0.7rem;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

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

.template-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface-card);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}

.template-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.template-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.template-info h4 {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy-800);
}

.template-info .template-desc {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 2px;
}

/* Info Section */
.admin-info-section {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--gray-200);
}

.admin-info-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-800);
}

.admin-info-title svg {
    flex-shrink: 0;
}

.admin-info-list {
    margin: 0;
    padding-left: 20px;
    color: var(--gray-600);
    font-size: 0.8rem;
    line-height: 1.8;
}

.admin-info-list li {
    margin-bottom: 2px;
}

/* Filter Bar */
.filter-bar {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

.filter-bar-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.filter-group.filter-flex {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group.filter-flex label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
}

.filter-group.filter-flex input[type="date"] {
    padding: 6px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.75rem;
}

/* Tab Intro Text */
.tab-intro {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin: 0 0 16px 0;
}

/* No Data States */
.no-data-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
}

.no-data-cell {
    text-align: center;
    padding: 24px;
    color: var(--gray-500);
}

.no-data-cell svg {
    margin-bottom: 8px;
    opacity: 0.5;
}

.no-data-cell p {
    margin: 0;
}

/* Color Utility Classes */
.text-purple { color: #7c3aed; }
.text-warning { color: #d97706; }
.text-info { color: #0891b2; }
.text-success { color: #059669; }
.text-danger { color: var(--danger-color); }
.text-muted { color: var(--gray-500); }

/* Email Admin Responsive */
@media (max-width: 768px) {
    .email-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .email-charts-row {
        grid-template-columns: 1fr;
    }
    
    .send-cards-row {
        grid-template-columns: 1fr;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
    }
}


/* Compliance Indicators */
.compliance-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-left: 8px;
}

.compliance-indicator.compliant {
    color: #16a34a;
}

.compliance-indicator.non-compliant {
    color: #dc2626;
}

/* Compliance badge */
.compliance-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.compliance-badge.compliant {
    background: #dcfce7;
    color: #166534;
}

.compliance-badge.non-compliant {
    background: #fee2e2;
    color: #991b1b;
}

/* Risk banding badge */
.risk-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.risk-badge.low {
    background: #dcfce7;
    color: #166534;
}

.risk-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.risk-badge.high {
    background: #fee2e2;
    color: #991b1b;
}

/* Assurance Overview - 4 column health strip */
.health-strip.assurance-strip {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .health-strip.assurance-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .health-strip.assurance-strip {
        grid-template-columns: 1fr;
    }
}

/* Assurance Overview - Compact Table */
.assurance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.assurance-table th,
.assurance-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
    vertical-align: middle;
}

.assurance-table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--gray-600);
    white-space: nowrap;
}

.assurance-table .col-customer {
    width: 20%;
    min-width: 120px;
}

.assurance-table .col-site {
    width: 30%;
    min-width: 150px;
    word-break: break-word;
}

.assurance-table .col-compliance,
.assurance-table .col-risk-score,
.assurance-table .col-risk-level {
    width: 12%;
    text-align: center;
    white-space: nowrap;
}

.assurance-table .col-actions {
    width: 14%;
    text-align: right;
    white-space: nowrap;
}

.assurance-table th.col-compliance,
.assurance-table th.col-risk-score,
.assurance-table th.col-risk-level {
    text-align: center;
}

.assurance-table th.col-actions {
    text-align: right;
}

.assurance-table tr:hover {
    background: var(--gray-50);
}

.assurance-table .btn-sm {
    padding: 4px 10px;
    font-size: 0.75rem;
}

/* Multiline tooltip support */
.help-tooltip.tooltip-multiline::after {
    white-space: pre-line;
    max-width: 280px;
    text-align: left;
    line-height: 1.5;
    text-transform: none;
}

/* Ensure all tooltips display in normal case */
.help-tooltip::after {
    text-transform: none !important;
}

/* ========================================
   Dashboard V3 - Professional Redesign
   ======================================== */

.dashboard-v3 {
    padding: 0;
    width: 100%;
}

.dashboard-v3 .dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: var(--spacing-md);
}

.dashboard-v3 .dash-header.with-logo {
    gap: var(--spacing-md);
}

.dashboard-v3 .dash-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy-800);
    margin: 0;
}

.dashboard-v3 .header-title h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy-800);
    margin: 0;
}

.dashboard-v3 .logo-pair {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-v3 .brand-logo {
    height: 32px;
    width: auto;
}

.dashboard-v3 .logo-divider {
    color: var(--gray-300);
    font-size: 1.5rem;
    font-weight: 200;
}

.dashboard-v3 .customer-logo {
    height: 32px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

/* Hero Band */
.dashboard-v3 .hero-band {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-900) 100%);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    color: white;
}

.dashboard-v3 .hero-status {
    display: flex;
    align-items: center;
}

.dashboard-v3 .compliance-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    min-width: 100px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.dashboard-v3 .badge-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    opacity: 0.8;
    margin-bottom: 2px;
}

.dashboard-v3 .badge-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

/* Hero Gauge */
.dashboard-v3 .hero-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dashboard-v3 .gauge-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
}

.dashboard-v3 .gauge-svg {
    width: 100%;
    height: 100%;
}

.dashboard-v3 .gauge-bg {
    stroke: rgba(255,255,255,0.15);
}

.dashboard-v3 .gauge-good .gauge-fill { stroke: #10b981; }
.dashboard-v3 .gauge-warning .gauge-fill { stroke: #f59e0b; }
.dashboard-v3 .gauge-danger .gauge-fill { stroke: #ef4444; }

.dashboard-v3 .gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.dashboard-v3 .gauge-center .gauge-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: white;
}

.dashboard-v3 .gauge-center .gauge-unit {
    font-size: 0.75rem;
    color: white;
    opacity: 0.9;
}

.dashboard-v3 .gauge-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    opacity: 0.8;
}

/* Hero Summary */
.dashboard-v3 .hero-summary {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.dashboard-v3 .summary-text .summary-headline {
    font-size: 0.95rem;
    margin: 0;
    opacity: 0.9;
    line-height: 1.4;
}

.dashboard-v3 .summary-stats {
    display: flex;
    gap: var(--spacing-lg);
}

.dashboard-v3 .mini-stat {
    display: flex;
    flex-direction: column;
}

.dashboard-v3 .mini-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.dashboard-v3 .mini-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
}

/* Section Headers */
.dashboard-v3 .section-header {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--gray-200);
}

.dashboard-v3 .section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-800);
    margin: 0;
}

.dashboard-v3 .section-subtitle {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Action Board - 4 Card Grid */
.dashboard-v3 .action-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

@media (max-width: 1200px) {
    .dashboard-v3 .action-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .dashboard-v3 .action-board {
        grid-template-columns: 1fr;
    }
}

.dashboard-v3 .action-card {
    background: var(--surface-card);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dashboard-v3 .action-card .card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--gray-100);
}

.dashboard-v3 .action-card .card-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-v3 .card-overdue .card-icon { background: rgba(220, 38, 38, 0.1); color: #dc2626; }
.dashboard-v3 .card-late .card-icon { background: rgba(217, 119, 6, 0.1); color: #d97706; }
.dashboard-v3 .card-docs .card-icon { background: rgba(220, 38, 38, 0.1); color: #dc2626; }
.dashboard-v3 .card-remediation .card-icon { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.dashboard-v3 .card-declined .card-icon { background: rgba(127, 29, 29, 0.1); color: #7f1d1d; }

.dashboard-v3 .action-card .card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-800);
    flex: 1;
}

.dashboard-v3 .action-card .card-count {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

.dashboard-v3 .card-overdue .card-count { color: #dc2626; }
.dashboard-v3 .card-late .card-count { color: #d97706; }
.dashboard-v3 .card-docs .card-count { color: #dc2626; }
.dashboard-v3 .card-remediation .card-count { color: #7c3aed; }
.dashboard-v3 .card-declined .card-count { color: #7f1d1d; }

.dashboard-v3 .action-card .card-body {
    padding: var(--spacing-sm);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dashboard-v3 .card-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dashboard-v3 .card-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.dashboard-v3 .card-item:hover {
    background: var(--gray-50);
}

.dashboard-v3 .item-main {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.dashboard-v3 .item-site {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--navy-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-v3 .item-discipline {
    font-size: 0.7rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-v3 .item-meta {
    font-size: 0.7rem;
    color: var(--gray-500);
    font-weight: 500;
    white-space: nowrap;
}

.dashboard-v3 .item-badge {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.dashboard-v3 .badge-cr {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.dashboard-v3 .badge-rec {
    background: rgba(8, 145, 178, 0.1);
    color: #0891b2;
}

.dashboard-v3 .badge-declined {
    background: rgba(127, 29, 29, 0.15);
    color: #7f1d1d;
    font-size: 0.65rem;
}

.dashboard-v3 .card-link {
    display: block;
    text-align: center;
    padding: 8px;
    margin-top: auto;
    font-size: 0.75rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.dashboard-v3 .card-link:hover {
    text-decoration: underline;
}

.dashboard-v3 .card-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    color: var(--gray-400);
    gap: 6px;
}

.dashboard-v3 .card-empty span {
    font-size: 0.8rem;
}

/* Activity Row */
.dashboard-v3 .activity-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

@media (max-width: 900px) {
    .dashboard-v3 .activity-row {
        grid-template-columns: 1fr;
    }
}

.dashboard-v3 .activity-panel {
    background: var(--surface-card);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.dashboard-v3 .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.dashboard-v3 .panel-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy-800);
    margin: 0;
}

.dashboard-v3 .panel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-v3 .panel-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--gray-200);
    border-radius: 10px;
    color: var(--gray-600);
}

.dashboard-v3 .panel-body {
    padding: 4px;
    max-height: 220px;
    overflow-y: auto;
}

.dashboard-v3 .visit-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dashboard-v3 .visit-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.dashboard-v3 .visit-row:hover {
    background: var(--gray-50);
}

.dashboard-v3 .visit-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 32px;
    padding: 2px 6px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.dashboard-v3 .visit-date .day {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-800);
    line-height: 1;
}

.dashboard-v3 .visit-date .month {
    font-size: 0.55rem;
    text-transform: uppercase;
    color: var(--gray-500);
    letter-spacing: 0.5px;
}

.dashboard-v3 .visit-status {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-v3 .status-ontime {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.dashboard-v3 .status-late {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
}

.dashboard-v3 .visit-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.dashboard-v3 .visit-discipline {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--navy-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-v3 .visit-site {
    font-size: 0.65rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-v3 .stat-tag {
    font-size: 0.55rem;
    padding: 1px 4px;
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

.dashboard-v3 .visit-arrow {
    color: var(--gray-400);
}

.dashboard-v3 .visit-completed {
    font-size: 0.65rem;
    color: var(--gray-500);
    white-space: nowrap;
}

.dashboard-v3 .panel-empty {
    padding: var(--spacing-md);
    text-align: center;
    color: var(--gray-400);
    font-size: 0.75rem;
}

.dashboard-v3 .visit-list-compact {
    display: flex;
    flex-direction: column;
}

.dashboard-v3 .visit-row-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    text-decoration: none;
    color: inherit;
    border-radius: 3px;
    transition: background 0.1s ease;
}

.dashboard-v3 .visit-row-compact:hover {
    background: var(--gray-50);
}

.dashboard-v3 .visit-date-inline {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--gray-500);
    min-width: 38px;
}

.dashboard-v3 .visit-text {
    font-size: 0.7rem;
    color: var(--navy-800);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-v3 .visit-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dashboard-v3 .dot-ontime {
    background: #10b981;
}

.dashboard-v3 .dot-late {
    background: #f59e0b;
}

.dashboard-v3 .activity-more {
    margin-top: 2px;
    border-top: 1px solid var(--gray-100);
}

.dashboard-v3 .activity-more summary {
    padding: 4px 6px;
    font-size: 0.65rem;
    color: var(--gray-400);
    cursor: pointer;
    text-align: center;
    list-style: none;
}

.dashboard-v3 .activity-more summary::-webkit-details-marker {
    display: none;
}

.dashboard-v3 .activity-more summary:hover {
    color: var(--primary-color);
}

.dashboard-v3 .activity-more[open] summary {
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 2px;
}

/* Hero Band Responsive */
@media (max-width: 768px) {
    .dashboard-v3 .hero-band {
        flex-wrap: wrap;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
    }
    
    .dashboard-v3 .summary-stats {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
}

/* Dashboard filter widths */
.dashboard-v3 .filter-group.filter-customer {
    flex: 0 1 300px !important;
    min-width: 80px !important;
}

.dashboard-v3 .filter-group.filter-site {
    flex: 0 1 600px !important;
    min-width: 100px !important;
}

.dashboard-v3 .filter-group.filter-discipline {
    flex: 0 1 350px !important;
    min-width: 80px !important;
}

.dashboard-v3 .filter-group.filter-year {
    flex: 0 1 100px !important;
    min-width: 60px !important;
}

/* Missing Paperwork Notice */
.missing-paperwork-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 8px 0;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #991b1b;
    font-size: 0.85rem;
}

.missing-paperwork-notice svg {
    flex-shrink: 0;
    color: #dc2626;
}

/* Documents Tab Drop Zone */
.docs-tab-dropzone {
    margin-bottom: 16px;
}

/* Helpdesk Tasks Widget */
.helpdesk-tasks-widget {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
}

.helpdesk-tabs {
    display: flex;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.helpdesk-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.helpdesk-tab:hover {
    color: var(--gray-700);
    background: var(--gray-100);
}

.helpdesk-tab.active {
    color: var(--primary-color);
    background: #fff;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: -1px;
}

.helpdesk-tab .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-600);
    border-radius: 10px;
}

.helpdesk-tab.active .tab-count {
    background: var(--primary-color);
    color: #fff;
}

.helpdesk-panel {
    padding: 0;
}

.helpdesk-panel .panel-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f0f9ff;
    color: #0369a1;
    font-size: 0.8rem;
    border-bottom: 1px solid #bae6fd;
}

.helpdesk-panel .panel-info svg {
    flex-shrink: 0;
}

.helpdesk-table-wrapper {
    overflow-x: auto;
}

.helpdesk-table thead th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px;
}

.helpdesk-table thead th.sortable:hover {
    background: var(--gray-100);
}

.helpdesk-table thead th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 8px;
    color: var(--gray-400);
    font-size: 0.75rem;
}

.helpdesk-table thead th.sortable.asc::after {
    content: '↑';
    color: var(--primary-color);
}

.helpdesk-table thead th.sortable.desc::after {
    content: '↓';
    color: var(--primary-color);
}

.helpdesk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.helpdesk-table thead th {
    position: sticky;
    top: 0;
    background: var(--gray-50);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.helpdesk-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s;
}

.helpdesk-table tbody tr:hover {
    background: var(--gray-50);
}

.helpdesk-table td {
    padding: 10px 12px;
    color: var(--gray-700);
}

.helpdesk-table .col-date {
    font-weight: 600;
    color: var(--secondary-color);
    white-space: nowrap;
}

.helpdesk-table .col-customer {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.helpdesk-table .col-site {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.helpdesk-table .col-service {
    color: var(--primary-color);
    font-weight: 500;
}

.helpdesk-table .col-status .status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
}

.helpdesk-table .col-status .status-yes {
    background: #dcfce7;
    color: #166534;
}

.helpdesk-table .col-status .status-no {
    background: #fee2e2;
    color: #991b1b;
}

.helpdesk-table .col-simpro .simpro-id {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.helpdesk-table .col-action {
    text-align: right;
}

.helpdesk-table .btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    color: var(--gray-400);
    transition: all 0.15s;
}

.helpdesk-table .btn-action:hover {
    background: var(--primary-color);
    color: #fff;
}

.helpdesk-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--gray-400);
}

.helpdesk-empty svg {
    color: #10b981;
}

.helpdesk-empty span {
    font-size: 0.9rem;
}

/* Helpdesk Status Tags */
.helpdesk-table .status-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.helpdesk-table .status-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 3px;
    white-space: nowrap;
}

.helpdesk-table .tag-completion {
    background: #fef3c7;
    color: #92400e;
}

.helpdesk-table .tag-paperwork {
    background: #fee2e2;
    color: #991b1b;
}

.helpdesk-table .tag-remediation {
    background: #dbeafe;
    color: #1e40af;
}

/* Helpdesk Tasks Page */
.helpdesk-tasks-page {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
}

.helpdesk-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding-right: 16px;
}

.helpdesk-tabs-row .helpdesk-tabs {
    border-bottom: none;
    flex: 0 1 auto;
}

.helpdesk-tabs-row .helpdesk-tab {
    flex: 0 1 auto;
    padding: 12px 24px;
}

.helpdesk-actions {
    display: flex;
    gap: 8px;
}

.helpdesk-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.helpdesk-actions .btn svg {
    flex-shrink: 0;
}
