/* ===================================================================
   PPG REFINISH CRM v2.0 - MAIN STYLESHEET
   Salesforce-Inspired Design System for Training & Digital Leader
   =================================================================== */

/* ===================================================================
   1. CSS VARIABLES & DESIGN TOKENS
   =================================================================== */
:root {
    /* Primary Brand Colors */
    --ppg-blue-primary: #0066CC;
    --ppg-blue-dark: #004080;
    --ppg-blue-light: #3399FF;
    --ppg-blue-pale: #E6F2FF;

    /* Semantic Colors */
    --color-success: #28A745;
    --color-warning: #FFC107;
    --color-danger: #DC3545;
    --color-info: #17A2B8;

    /* Health Status Colors */
    --health-healthy: #28A745;
    --health-at-risk: #FFC107;
    --health-critical: #DC3545;

    /* Neutral Grays */
    --gray-50: #F8F9FA;
    --gray-100: #E9ECEF;
    --gray-200: #DEE2E6;
    --gray-300: #CED4DA;
    --gray-400: #ADB5BD;
    --gray-500: #6C757D;
    --gray-600: #495057;
    --gray-700: #343A40;
    --gray-800: #212529;
    --gray-900: #0D1117;

    /* Semantic Neutrals */
    --color-text-primary: #212529;
    --color-text-secondary: #6C757D;
    --color-text-muted: #ADB5BD;
    --color-border: #DEE2E6;
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F8F9FA;
    --color-bg-tertiary: #E9ECEF;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Spacing Scale (8px base) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* Typography */
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    --font-family-mono: 'Courier New', Courier, monospace;

    /* Font Sizes */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 30px;
    --text-4xl: 36px;

    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Layout Dimensions */
    --header-height: 64px;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ===================================================================
   2. GLOBAL RESET & BASE STYLES
   =================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: 1.5;
    color: var(--color-text-primary);
    background-color: var(--color-bg-secondary);
    overflow-x: hidden;
}

/* ===================================================================
   3. LOGIN SCREEN
   =================================================================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ppg-blue-dark) 0%, var(--ppg-blue-primary) 100%);
    padding: var(--space-4);
}

.login-container {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--space-10);
    max-width: 420px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.login-logo {
    color: var(--ppg-blue-primary);
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-2);
}

.version-badge {
    display: inline-block;
    background: var(--ppg-blue-pale);
    color: var(--ppg-blue-primary);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    margin-left: var(--space-2);
}

.login-subtitle {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    margin-top: var(--space-2);
}

.login-form {
    margin-top: var(--space-6);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
}

.form-control {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-family: var(--font-family-base);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--ppg-blue-primary);
    box-shadow: 0 0 0 3px var(--ppg-blue-pale);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    font-family: var(--font-family-base);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--ppg-blue-primary);
    color: white;
    width: 100%;
}

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

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

/* ===================================================================
   4. MAIN APPLICATION LAYOUT
   =================================================================== */
.main-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===================================================================
   5. HEADER V2 (Enhanced with Search & Quick Actions)
   =================================================================== */
.header-v2 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-bg-primary);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    z-index: var(--z-fixed);
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.logo-v2 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.logo-v2 h1 {
    color: var(--ppg-blue-primary);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin: 0;
}

.version-badge-v2 {
    background: linear-gradient(135deg, var(--ppg-blue-primary), var(--ppg-blue-light));
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
}

.header-center {
    flex: 1;
    max-width: 600px;
    margin: 0 var(--space-8);
}

.search-bar-v2 {
    position: relative;
}

.search-bar-v2 input {
    width: 100%;
    padding: var(--space-3) var(--space-4) var(--space-3) var(--space-10);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    background: var(--color-bg-secondary);
    transition: all var(--transition-fast);
}

.search-bar-v2 input:focus {
    outline: none;
    border-color: var(--ppg-blue-primary);
    background: var(--color-bg-primary);
    box-shadow: var(--shadow-md);
}

.search-bar-v2::before {
    content: '\f002'; /* FontAwesome search icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}

.header-icon-btn:hover {
    background: var(--ppg-blue-pale);
    color: var(--ppg-blue-primary);
}

.header-icon-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--color-danger);
    color: white;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: var(--font-bold);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu-v2 {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.user-menu-v2:hover {
    background: var(--color-bg-secondary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--ppg-blue-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
}

.user-role {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

/* ===================================================================
   6. MAIN CONTAINER (Sidebar + Content)
   =================================================================== */
.main-container-v2 {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* ===================================================================
   7. SIDEBAR NAVIGATION V2
   =================================================================== */
.sidebar-v2 {
    width: var(--sidebar-width);
    background: var(--color-bg-primary);
    border-right: 1px solid var(--color-border);
    padding: var(--space-4) 0;
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: 0;
    z-index: var(--z-sticky);
}

.nav-menu-v2 {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-section-title {
    padding: var(--space-4) var(--space-6) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}

.nav-item-v2 {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-6);
    margin: var(--space-1) var(--space-3);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item-v2 i {
    width: 20px;
    font-size: var(--text-base);
}

.nav-item-v2:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
}

.nav-item-v2.active {
    background: var(--ppg-blue-pale);
    color: var(--ppg-blue-primary);
    font-weight: var(--font-semibold);
}

.nav-item-v2.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--ppg-blue-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.nav-badge {
    margin-left: auto;
    padding: 2px var(--space-2);
    background: var(--ppg-blue-primary);
    color: white;
    font-size: 10px;
    font-weight: var(--font-bold);
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.nav-badge.new {
    background: var(--color-success);
}

/* ===================================================================
   8. MAIN CONTENT AREA V2
   =================================================================== */
.main-content-v2 {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-6);
    background: var(--color-bg-secondary);
    min-height: calc(100vh - var(--header-height));
}

.page-v2 {
    display: none;
    animation: fadeIn var(--transition-base);
}

.page-v2.active {
    display: block;
}

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

.page-header-v2 {
    margin-bottom: var(--space-6);
}

.page-header-v2 h1 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.page-subtitle {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
}

/* ===================================================================
   9. DASHBOARD METRICS CARDS
   =================================================================== */
.metrics-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

.metric-card-v2 {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    transition: all var(--transition-base);
}

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

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    color: white;
    flex-shrink: 0;
}

.metric-content {
    flex: 1;
}

.metric-content h3 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.metric-content p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

.metric-trend {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.metric-trend.positive {
    background: rgba(40, 167, 69, 0.1);
    color: var(--color-success);
}

.metric-trend.negative {
    background: rgba(220, 53, 69, 0.1);
    color: var(--color-danger);
}

/* ===================================================================
   10. CARD COMPONENTS V2
   =================================================================== */
.card-v2 {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: var(--space-6);
}

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

.card-header-v2 h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin: 0;
}

.card-actions {
    display: flex;
    gap: var(--space-2);
}

.card-body-v2 {
    padding: var(--space-6);
}

.card-footer-v2 {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-secondary);
}

/* ===================================================================
   11. PROGRESS BAR
   =================================================================== */
.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-4);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ppg-blue-primary), var(--ppg-blue-light));
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.module-status ul {
    list-style: none;
    padding: 0;
}

.module-status li {
    padding: var(--space-3) 0;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.module-status li::before {
    font-size: var(--text-lg);
}

/* ===================================================================
   12. MODAL V2
   =================================================================== */
.modal-v2 {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.modal-v2.active {
    display: flex;
}

.modal-content-v2 {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn var(--transition-base);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================================================
   13. QUICK ACTIONS MODAL
   =================================================================== */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-4);
    padding: var(--space-6);
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-6);
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-action-btn:hover {
    background: var(--ppg-blue-pale);
    border-color: var(--ppg-blue-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-action-btn i {
    font-size: var(--text-3xl);
    color: var(--ppg-blue-primary);
}

.quick-action-btn span {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
    text-align: center;
}

/* ===================================================================
   14. RESPONSIVE BREAKPOINTS
   =================================================================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .sidebar-v2 {
        width: var(--sidebar-collapsed-width);
    }

    .main-content-v2 {
        margin-left: var(--sidebar-collapsed-width);
    }

    .nav-item-v2 span {
        display: none;
    }

    .nav-section-title {
        display: none;
    }

    .nav-badge {
        display: none;
    }

    .header-center {
        margin: 0 var(--space-4);
    }

    .metrics-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    .header-v2 {
        padding: 0 var(--space-4);
    }

    .header-center {
        display: none;
    }

    .sidebar-v2 {
        transform: translateX(-100%);
        transition: transform var(--transition-base);
    }

    .sidebar-v2.mobile-open {
        transform: translateX(0);
    }

    .main-content-v2 {
        margin-left: 0;
        padding: var(--space-4);
    }

    .metrics-grid-v2 {
        grid-template-columns: 1fr;
    }

    .page-header-v2 h1 {
        font-size: var(--text-2xl);
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .user-info {
        display: none;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .header-v2 {
        height: 56px;
    }

    .logo-v2 h1 {
        font-size: var(--text-base);
    }

    .version-badge-v2 {
        display: none;
    }

    .main-container-v2 {
        margin-top: 56px;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
   15. UTILITY CLASSES
   =================================================================== */
.text-primary { color: var(--ppg-blue-primary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-muted { color: var(--color-text-muted); }

.bg-primary { background: var(--ppg-blue-primary); }
.bg-success { background: var(--color-success); }
.bg-warning { background: var(--color-warning); }
.bg-danger { background: var(--color-danger); }

.font-bold { font-weight: var(--font-bold); }
.font-semibold { font-weight: var(--font-semibold); }
.font-medium { font-weight: var(--font-medium); }

.text-center { text-align: center; }
.text-right { text-align: right; }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

/* ===================================================================
   16. CUSTOMER 360° VIEW COMPONENTS
   =================================================================== */

/* Customers Grid */
.customers-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: var(--space-6);
}

/* Customer Card */
.customer-card-v2 {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-6);
    cursor: pointer;
    transition: all var(--transition-base);
}

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

.customer-card-header {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.customer-avatar-v2 {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--ppg-blue-primary), var(--ppg-blue-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    flex-shrink: 0;
}

.customer-info-basic h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.customer-meta {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-1);
}

.customer-meta .separator {
    margin: 0 var(--space-2);
}

.customer-card-metrics {
    display: flex;
    gap: var(--space-6);
    align-items: center;
    padding: var(--space-5) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-4);
}

/* Engagement Score Mini */
.engagement-score-mini {
    position: relative;
    flex-shrink: 0;
}

.engagement-score-mini .score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.engagement-score-mini .score-value {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
}

/* Customer Status Badges */
.customer-status-badges {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    flex: 1;
}

.health-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
}

.health-badge.health-healthy {
    background: rgba(40, 167, 69, 0.1);
    color: var(--color-success);
}

.health-badge.health-at-risk {
    background: rgba(255, 193, 7, 0.1);
    color: var(--color-warning);
}

.health-badge.health-critical {
    background: rgba(220, 53, 69, 0.1);
    color: var(--color-danger);
}

.metric-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

.customer-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.last-activity {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.customer-card-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.btn-view-detail {
    padding: var(--space-2) var(--space-4);
    background: var(--ppg-blue-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-view-detail:hover {
    background: var(--ppg-blue-dark);
}

.btn-delete-customer {
    padding: var(--space-2);
    width: 36px;
    height: 36px;
    background: #FEE;
    color: #DC3545;
    border: 1px solid #FFD6D6;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-customer:hover {
    background: #DC3545;
    color: white;
    border-color: #DC3545;
    transform: scale(1.05);
}

/* Customers Toolbar */
.customers-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
    margin-bottom: var(--space-6);
    border-bottom: 2px solid var(--color-border);
}

.customers-toolbar-left h2 {
    margin: 0;
    font-size: var(--text-2xl);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.customers-toolbar-right {
    display: flex;
    gap: var(--space-3);
}

/* 360° View Layout */
.customer-360-view {
    animation: fadeIn var(--transition-base);
}

.customer-360-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: var(--space-6);
}

.customer-360-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.customer-360-right {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

/* Profile Card */
.profile-card-v2 .profile-field {
    margin-bottom: var(--space-4);
}

.profile-card-v2 .profile-field:last-child {
    margin-bottom: 0;
}

.profile-card-v2 .profile-field label {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}

.profile-card-v2 .profile-field p {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    margin: 0;
}

/* Engagement Score Card */
.engagement-card-v2 .engagement-score-large {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-6);
}

.engagement-card-v2 .score-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.engagement-card-v2 .score-value {
    font-size: 48px;
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    line-height: 1;
}

.engagement-card-v2 .score-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-1);
}

/* Score Breakdown */
.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
}

.breakdown-header span:first-child {
    color: var(--color-text-primary);
    font-weight: var(--font-medium);
}

.breakdown-score {
    color: var(--color-text-secondary);
    font-weight: var(--font-semibold);
}

.breakdown-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

/* Next Best Actions */
.actions-card-v2 .action-item {
    padding: var(--space-5);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.actions-card-v2 .action-item:last-child {
    margin-bottom: 0;
}

.action-header {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.action-priority-badge {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
}

.action-item.action-priority-critical .action-priority-badge {
    background: var(--color-danger);
    color: white;
}

.action-item.action-priority-high .action-priority-badge {
    background: var(--color-warning);
    color: var(--gray-900);
}

.action-item.action-priority-medium .action-priority-badge {
    background: var(--color-info);
    color: white;
}

.action-item.action-priority-low .action-priority-badge {
    background: var(--gray-400);
    color: white;
}

.action-category {
    padding: var(--space-1) var(--space-3);
    background: var(--ppg-blue-pale);
    color: var(--ppg-blue-primary);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
}

.action-item h4 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.action-item p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

/* Timeline */
.timeline-v2 {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.timeline-item {
    display: flex;
    gap: var(--space-4);
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--ppg-blue-pale);
    color: var(--ppg-blue-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-content h4 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.timeline-content p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

.timeline-time {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.stat-item {
    text-align: center;
    padding: var(--space-4);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
}

.stat-value {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--ppg-blue-primary);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.stat-label {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Lists (Training, Equipment, Tickets) */
.training-list,
.equipment-list,
.ticket-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.training-item,
.equipment-item,
.ticket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
}

.badge {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
}

.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--color-success);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.1);
    color: var(--color-warning);
}

.badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--color-danger);
}

.badge-info {
    background: rgba(23, 162, 184, 0.1);
    color: var(--color-info);
}

.badge-secondary {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* Back Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--color-bg-secondary);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: var(--space-4);
}

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

/* Button Icon */
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--ppg-blue-pale);
    color: var(--ppg-blue-primary);
}

/* Button Small */
.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-12);
}

.empty-state h3 {
    font-size: var(--text-xl);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.empty-state p {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
}

/* ===================================================================
   17. RESPONSIVE - CUSTOMER 360°
   =================================================================== */
@media (max-width: 1200px) {
    .customer-360-grid {
        grid-template-columns: 1fr;
    }

    .customers-grid-v2 {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .customer-card-metrics {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .customers-grid-v2 {
        grid-template-columns: 1fr;
    }
}


/* ========================================
   SUPPORT TICKETS & KNOWLEDGE BASE STYLES
   ======================================== */

/* Tickets Statistics Cards */
.tickets-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

/* Tickets Grid */
.tickets-list {
    background: white;
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-5);
}

/* Ticket Card */
.ticket-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.ticket-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--color-bg-secondary);
}

.ticket-number {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--ppg-blue-primary);
}

.ticket-badges {
    display: flex;
    gap: var(--space-2);
}

.badge-priority,
.badge-severity,
.badge-status {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ticket-card-body {
    margin-bottom: var(--space-4);
}

.ticket-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 var(--space-3) 0;
}

.ticket-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0 0 var(--space-4) 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.ticket-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.ticket-meta-item i {
    color: var(--ppg-blue-primary);
}

.ticket-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* SLA Indicators */
.sla-indicator {
    padding: 4px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sla-indicator.breached {
    background: #FEE;
    color: var(--color-danger);
}

.sla-indicator.warning {
    background: #FFF3CD;
    color: #856404;
}

/* Ticket Detail Modal */
.ticket-detail {
    padding: var(--space-4);
}

.ticket-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-5);
    border-bottom: 2px solid var(--color-border);
}

.ticket-number-large {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--ppg-blue-primary);
    margin-bottom: var(--space-2);
}

.ticket-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.ticket-detail-body {
    margin-bottom: var(--space-6);
}

.ticket-section {
    margin-bottom: var(--space-6);
}

.ticket-section h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.ticket-section h3 i {
    color: var(--ppg-blue-primary);
}

.ticket-detail-actions {
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 2px solid var(--color-border);
}

.action-group {
    margin-bottom: var(--space-4);
}

.action-group label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

.btn-group {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* Simple Timeline for Ticket Detail */
.timeline-simple {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.timeline-item-simple {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
}

.timeline-item-simple i {
    font-size: var(--text-xl);
    margin-top: 2px;
}

.timeline-item-simple strong {
    display: block;
    font-size: var(--text-base);
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.timeline-item-simple p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* Empty State for Tickets */
.empty-state-tickets {
    text-align: center;
    padding: 64px 32px;
}

.empty-state-tickets i {
    font-size: 64px;
    color: var(--gray-300);
    margin-bottom: var(--space-5);
}

.empty-state-tickets h3 {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-3);
}

.empty-state-tickets p {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin-bottom: var(--space-5);
}


/* ========================================
   KNOWLEDGE BASE STYLES
   ======================================== */

/* Knowledge Base Search Bar */
.kb-search-bar {
    background: white;
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}

.kb-search-input-group {
    position: relative;
    margin-bottom: var(--space-4);
}

.kb-search-input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    font-size: var(--text-lg);
}

.kb-search-input-group input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    transition: all 0.2s ease;
}

.kb-search-input-group input:focus {
    outline: none;
    border-color: var(--ppg-blue-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.kb-filters {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.kb-filters select {
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}

/* Knowledge Base Categories Grid */
.kb-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.kb-category-card {
    background: white;
    border: 1px solid var(--color-border);
    border-left-width: 4px;
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

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

.kb-category-icon {
    font-size: var(--text-3xl);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
}

.kb-category-info h4 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 4px 0;
}

.kb-category-info p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

/* Knowledge Base Articles Section */
.kb-articles-section {
    background: white;
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.kb-articles-header {
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--color-border);
}

.kb-articles-header h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.kb-articles-header h2 i {
    color: var(--ppg-blue-primary);
}

/* Knowledge Base Articles List */
.kb-articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-5);
}

/* Knowledge Base Article Card */
.kb-article-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.kb-article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.kb-category-badge {
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kb-status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.kb-article-body {
    margin-bottom: var(--space-4);
}

.kb-article-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 var(--space-3) 0;
}

.kb-article-summary {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0 0 var(--space-3) 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kb-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.kb-tag {
    padding: 4px 10px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-full);
    font-size: 11px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.kb-article-footer {
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
}

.kb-article-meta {
    display: flex;
    gap: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.kb-article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kb-article-meta i {
    color: var(--ppg-blue-primary);
}

/* Knowledge Base Article Detail */
.kb-article-detail {
    padding: var(--space-4);
}

.kb-article-detail-header {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-5);
    border-bottom: 2px solid var(--color-border);
}

.kb-article-detail-header h2 {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-text-primary);
    margin: var(--space-4) 0 var(--space-3) 0;
}

.kb-article-summary-large {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

.kb-article-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.meta-item i {
    color: var(--ppg-blue-primary);
}

.kb-article-tags-large {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.kb-article-detail-content {
    margin-bottom: var(--space-6);
}

.kb-article-detail-content h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.kb-article-detail-content h3 i {
    color: var(--ppg-blue-primary);
}

.kb-content-formatted {
    font-size: var(--text-base);
    color: var(--color-text-primary);
    line-height: 1.8;
}

.kb-content-formatted h1,
.kb-content-formatted h2,
.kb-content-formatted h3 {
    margin-top: var(--space-5);
    margin-bottom: var(--space-3);
    color: var(--color-text-primary);
}

.kb-content-formatted ul,
.kb-content-formatted ol {
    margin: var(--space-4) 0;
    padding-left: var(--space-6);
}

.kb-content-formatted li {
    margin-bottom: var(--space-2);
}

.kb-content-formatted strong {
    font-weight: 600;
    color: var(--color-text-primary);
}

.kb-content-formatted em {
    font-style: italic;
}

.kb-related-articles {
    margin-bottom: var(--space-6);
    padding: var(--space-5);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
}

.kb-related-articles h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.kb-related-articles h3 i {
    color: var(--ppg-blue-primary);
}

.kb-related-articles ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kb-related-articles li {
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* Knowledge Base Feedback */
.kb-article-feedback {
    margin-bottom: var(--space-6);
    padding: var(--space-5);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    text-align: center;
}

.kb-article-feedback h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

.kb-feedback-buttons {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

/* Knowledge Base Article Actions */
.kb-article-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: center;
}

/* Empty State for Knowledge Base */
.empty-state-kb {
    text-align: center;
    padding: 64px 32px;
}

.empty-state-kb i {
    font-size: 64px;
    color: var(--gray-300);
    margin-bottom: var(--space-5);
}

.empty-state-kb h3 {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-3);
}

.empty-state-kb p {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin-bottom: var(--space-5);
}

/* Responsive Design for Tickets & KB */
@media (max-width: 1200px) {
    .tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .kb-articles-list {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .tickets-grid {
        grid-template-columns: 1fr;
    }
    
    .kb-articles-list {
        grid-template-columns: 1fr;
    }
    
    .kb-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .kb-filters {
        flex-direction: column;
    }
    
    .kb-filters select {
        width: 100%;
    }
    
    .tickets-stats {
        grid-template-columns: 1fr;
    }
}


/* ========================================
   DIGITAL TOOLS PIPELINE KANBAN BOARD
   ======================================== */

/* Pipeline Statistics */
.pipeline-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

/* Kanban Board Container */
.kanban-board {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    padding-bottom: var(--space-4);
    min-height: 600px;
}

/* Kanban Column */
.kanban-column {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    max-height: calc(100vh - 300px);
}

/* Kanban Column Header */
.kanban-column-header {
    padding: var(--space-5);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    flex-shrink: 0;
}

.kanban-header-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.kanban-header-info i {
    font-size: var(--text-xl);
}

.kanban-header-info h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.kanban-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 700;
}

.kanban-stage-desc {
    font-size: var(--text-sm);
    margin: 0;
    opacity: 0.9;
}

/* Kanban Column Body */
.kanban-column-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-height: 200px;
}

.kanban-column-body.drag-over {
    background: rgba(0, 102, 204, 0.1);
    border: 2px dashed var(--ppg-blue-primary);
}

/* Kanban Empty State */
.kanban-empty-state {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--color-text-muted);
}

.kanban-empty-state i {
    font-size: 48px;
    margin-bottom: var(--space-3);
    opacity: 0.3;
}

.kanban-empty-state p {
    margin: 0;
    font-size: var(--text-sm);
}

/* Kanban Card */
.kanban-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
    cursor: move;
    transition: all 0.2s ease;
    border-left: 4px solid var(--ppg-blue-primary);
}

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

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

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

.kanban-card-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: var(--text-base);
}

.kanban-card-title i {
    color: var(--ppg-blue-primary);
}

.kanban-card-value {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-success);
}

.kanban-card-body {
    margin-bottom: var(--space-3);
}

.kanban-card-customer,
.kanban-card-date {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

.kanban-card-customer i,
.kanban-card-date i {
    color: var(--ppg-blue-primary);
    width: 16px;
}

.kanban-card-notes {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-top: var(--space-2);
    padding: var(--space-2);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.kanban-card-age,
.kanban-card-assigned {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-muted);
}

.kanban-card-age i,
.kanban-card-assigned i {
    color: var(--ppg-blue-primary);
}

/* Pipeline Detail Modal */
.pipeline-detail {
    padding: var(--space-4);
}

.pipeline-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-5);
    border-bottom: 2px solid var(--color-border);
}

.pipeline-detail-header h2 {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 var(--space-2) 0;
}

.pipeline-detail-header p {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin: 0;
}

.pipeline-detail-stage {
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    color: white;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 700;
}

.pipeline-detail-stage i {
    font-size: var(--text-xl);
}

.pipeline-detail-body {
    margin-bottom: var(--space-6);
}

.pipeline-section {
    margin-bottom: var(--space-6);
}

.pipeline-section h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.pipeline-section h3 i {
    color: var(--ppg-blue-primary);
}

.pipeline-detail-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: center;
}

/* Responsive Kanban Board */
@media (max-width: 1400px) {
    .kanban-column {
        flex: 0 0 280px;
    }
}

@media (max-width: 768px) {
    .kanban-board {
        flex-direction: column;
    }
    
    .kanban-column {
        flex: 1;
        max-height: none;
    }
    
    .kanban-column-body {
        max-height: 400px;
    }
    
    .pipeline-stats {
        grid-template-columns: 1fr;
    }
}


/* ========================================
   EQUIPMENT MANAGEMENT STYLES
   ======================================== */

/* Equipment Statistics */
.equipment-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

/* Equipment Grid */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-5);
}

/* Equipment Card */
.equipment-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid var(--ppg-blue-primary);
}

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

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

.equipment-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--ppg-blue-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ppg-blue-primary);
    font-size: var(--text-2xl);
}

.equipment-status-badge {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.equipment-status-badge-large {
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: 700;
    color: white;
}

.equipment-card-body {
    margin-bottom: var(--space-4);
}

.equipment-name {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 var(--space-2) 0;
}

.equipment-serial {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-family: monospace;
    margin: 0 0 var(--space-4) 0;
}

.equipment-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.equipment-info-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.equipment-info-item i {
    color: var(--ppg-blue-primary);
    width: 16px;
}

.equipment-usage {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

.usage-bar {
    height: 8px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-success), var(--ppg-blue-primary));
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.usage-label {
    font-size: 12px;
    color: var(--color-text-muted);
}

.equipment-card-footer {
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
}

.equipment-warranty {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-muted);
}

.equipment-warranty i {
    color: var(--color-success);
}

/* Equipment Detail Modal */
.equipment-detail {
    padding: var(--space-4);
}

.equipment-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-5);
    border-bottom: 2px solid var(--color-border);
}

.equipment-detail-header h2 {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 var(--space-2) 0;
}

.equipment-detail-header p {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    font-family: monospace;
    margin: 0;
}

.equipment-detail-body {
    margin-bottom: var(--space-6);
}

.equipment-section {
    margin-bottom: var(--space-6);
}

.equipment-section h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.equipment-section h3 i {
    color: var(--ppg-blue-primary);
}

.equipment-detail-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: center;
}


/* ========================================
   USAGE ANALYTICS & ROI STYLES
   ======================================== */

/* Analytics Overview */
.analytics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

/* Analytics Section */
.analytics-section {
    background: white;
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}

.analytics-section h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 var(--space-5) 0;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.analytics-section h2 i {
    color: var(--ppg-blue-primary);
}

/* Adoption Table */
.adoption-table {
    overflow-x: auto;
}

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

.adoption-table th,
.adoption-table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.adoption-table th {
    background: var(--color-bg-secondary);
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.adoption-table td {
    font-size: var(--text-base);
    color: var(--color-text-primary);
}

.adoption-bar-container {
    position: relative;
    height: 32px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.adoption-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ppg-blue-primary), var(--color-success));
    transition: width 0.3s ease;
}

.adoption-rate-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

/* ROI Calculator */
.roi-calculator {
    display: grid;
    gap: var(--space-6);
}

.roi-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.roi-metric {
    padding: var(--space-5);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    text-align: center;
}

.roi-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-2);
}

.roi-value {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--ppg-blue-primary);
}

.roi-explanation {
    padding: var(--space-5);
    background: var(--ppg-blue-pale);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--ppg-blue-primary);
}

.roi-explanation h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 var(--space-3) 0;
}

.roi-explanation p {
    margin: 0 0 var(--space-3) 0;
    color: var(--color-text-secondary);
}

.roi-explanation ul {
    margin: 0 0 var(--space-4) 0;
    padding-left: var(--space-6);
}

.roi-explanation li {
    margin-bottom: var(--space-2);
    color: var(--color-text-primary);
}

.roi-explanation li strong {
    color: var(--ppg-blue-primary);
}

/* Responsive Analytics */
@media (max-width: 768px) {
    .equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .equipment-stats {
        grid-template-columns: 1fr;
    }
    
    .analytics-overview {
        grid-template-columns: 1fr;
    }
    
    .roi-summary {
        grid-template-columns: 1fr;
    }
    
    .adoption-table {
        font-size: var(--text-sm);
    }
}

/* ===================================================================
   18. TRAINING MANAGEMENT COMPONENTS
   =================================================================== */

/* Training Sessions List */
.training-sessions-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.training-session-card {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    cursor: pointer;
    transition: all var(--transition-base);
}

.training-session-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
    border-color: var(--ppg-blue-primary);
}

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

.session-code {
    font-family: var(--font-family-mono);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-weight: var(--font-semibold);
}

.session-info h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.session-customer {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.session-meta span {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.session-rating {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--ppg-blue-pale);
    border-radius: var(--radius-md);
    font-weight: var(--font-semibold);
}

.session-actions {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

/* Modal Styles */
.modal-v2 {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.modal-v2.active {
    display: flex;
}

.modal-content-v2 {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn var(--transition-base);
}

.modal-large {
    max-width: 800px;
}

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

.modal-header-v2 h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin: 0;
}

.modal-close-v2 {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: var(--text-2xl);
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal-close-v2:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
}

.modal-body-v2 {
    padding: var(--space-6);
}

.modal-footer-v2 {
    padding: var(--space-6);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--space-4);
}

.form-group label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.required {
    color: var(--color-danger);
}

.form-control {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-family: var(--font-family-base);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--ppg-blue-primary);
    box-shadow: 0 0 0 3px var(--ppg-blue-pale);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
}

/* Button Styles */
.btn-secondary {
    background: var(--gray-500);
    color: white;
    padding: var(--space-3) var(--space-6);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

/* Page Actions */
.page-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

/* ===================================================================
   19. PARTICIPANT ASSESSMENT COMPONENTS
   =================================================================== */

/* Modal XLarge */
.modal-xlarge {
    max-width: 1200px;
}

.modal-subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-1);
}

/* Tabs */
.participant-tabs {
    display: flex;
    gap: var(--space-2);
    border-bottom: 2px solid var(--color-border);
    margin-bottom: var(--space-6);
}

.tab-btn {
    padding: var(--space-3) var(--space-5);
    border: none;
    background: none;
    color: var(--color-text-secondary);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--ppg-blue-primary);
    background: var(--ppg-blue-pale);
}

.tab-btn.active {
    color: var(--ppg-blue-primary);
    border-bottom-color: var(--ppg-blue-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

/* Participants Grid */
.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-4);
}

.participant-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--transition-base);
}

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

.participant-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.participant-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--ppg-blue-primary), var(--ppg-blue-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    flex-shrink: 0;
}

.participant-info {
    flex: 1;
}

.participant-info h4 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.participant-info p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.participant-scores {
    display: flex;
    justify-content: space-between;
    padding: var(--space-4);
    background: var(--color-bg-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.score-item {
    text-align: center;
}

.score-label {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}

.score-value {
    display: block;
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--ppg-blue-primary);
}

.participant-actions {
    display: flex;
    gap: var(--space-2);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

/* Form Overlay */
.form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: calc(var(--z-modal) + 10);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    animation: fadeIn var(--transition-fast);
}

.form-container {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

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

.form-header h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin: 0;
}

.form-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: var(--text-2xl);
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-close:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
}

.form-container form {
    padding: var(--space-6);
}

/* Star Rating */
.skill-ratings {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.skill-rating-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.skill-rating-item label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

.star-rating {
    display: flex;
    gap: var(--space-1);
}

.star-rating .star {
    font-size: var(--text-xl);
    color: var(--gray-300);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.star-rating .star:hover,
.star-rating .star.active {
    color: #FFC107;
}

.star-rating-large {
    display: flex;
    gap: var(--space-2);
}

.star-rating-large .star {
    font-size: var(--text-3xl);
    color: var(--gray-300);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.star-rating-large .star:hover,
.star-rating-large .star.active {
    color: #FFC107;
    transform: scale(1.1);
}

.star-display {
    display: flex;
    gap: var(--space-1);
}

.star-display .fa-star {
    font-size: var(--text-base);
    color: var(--gray-300);
}

.star-display .fa-star.active {
    color: #FFC107;
}

/* Before/After Comparison */
.before-after-comparison {
    background: var(--color-bg-secondary);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
}

.comparison-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: var(--space-3);
}

.comparison-header > div:first-child {
    grid-column: 1;
}

.comparison-header > div:nth-child(2) {
    text-align: center;
}

.comparison-header > div:nth-child(3) {
    text-align: center;
}

.comparison-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-4);
    align-items: center;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
}

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

.skill-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
}

.before-rating,
.after-rating {
    display: flex;
    justify-content: center;
}

/* Skill Matrix */
.matrix-container {
    background: var(--color-bg-primary);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
}

.matrix-container h3 {
    margin-bottom: var(--space-6);
    color: var(--color-text-primary);
}

/* Skill Table */
.skill-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.skill-table thead {
    background: var(--ppg-blue-primary);
    color: white;
}

.skill-table th,
.skill-table td {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.skill-table th {
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
}

.skill-table td {
    font-size: var(--text-sm);
}

.skill-table tbody tr:hover {
    background: var(--color-bg-secondary);
}

.skill-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===================================================================
   20. ACTIVITY TIMELINE COMPONENTS
   =================================================================== */

/* Filters Bar */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: flex-end;
}

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

.filter-group label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

/* Enhanced Timeline */
.timeline-enhanced {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.timeline-date-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.timeline-date-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--ppg-blue-primary);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--ppg-blue-primary);
}

.timeline-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding-left: var(--space-8);
}

.timeline-item-enhanced {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.timeline-item-enhanced::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: calc(100% + var(--space-3));
    background: var(--color-border);
}

.timeline-item-enhanced:first-child::before {
    top: 50%;
    height: 50%;
}

.timeline-item-enhanced:last-child::before {
    bottom: 50%;
    height: 50%;
    top: auto;
}

.timeline-item-enhanced:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
    border-color: var(--ppg-blue-primary);
}

.timeline-marker {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--text-xl);
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.timeline-content-enhanced {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.timeline-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.timeline-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

.timeline-meta {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.duration-badge {
    padding: var(--space-1) var(--space-2);
    background: var(--ppg-blue-pale);
    color: var(--ppg-blue-primary);
    border-radius: var(--radius-sm);
    font-weight: var(--font-semibold);
    font-size: var(--text-xs);
}

.timeline-customer {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-weight: var(--font-medium);
}

.timeline-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.timeline-outcome {
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-3);
    background: var(--color-bg-secondary);
    border-left: 3px solid var(--color-success);
    border-radius: var(--radius-sm);
}

.timeline-footer {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-2);
}

.scope-badge,
.status-badge,
.priority-badge {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
}

.scope-customer {
    background: rgba(0, 102, 204, 0.1);
    color: var(--ppg-blue-primary);
}

.scope-internal {
    background: rgba(111, 66, 193, 0.1);
    color: #6F42C1;
}

.status-planned {
    background: rgba(255, 193, 7, 0.1);
    color: #FFC107;
}

.status-in-progress {
    background: rgba(23, 162, 184, 0.1);
    color: #17A2B8;
}

.status-completed {
    background: rgba(40, 167, 69, 0.1);
    color: #28A745;
}

.status-cancelled {
    background: rgba(108, 117, 125, 0.1);
    color: #6C757D;
}

.priority-high {
    background: rgba(220, 53, 69, 0.1);
    color: #DC3545;
}

.priority-medium {
    background: rgba(255, 193, 7, 0.1);
    color: #FFC107;
}

.priority-low {
    background: rgba(40, 167, 69, 0.1);
    color: #28A745;
}

/* Statistics Modal */
.stats-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
}

.stat-card {
    background: var(--color-bg-secondary);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
}

.stat-card h4 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--ppg-blue-primary);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--ppg-blue-primary);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--color-border);
}

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

.stat-item strong {
    color: var(--ppg-blue-primary);
    font-size: var(--text-base);
}

/* ===================================================================
   21. TRAINING PROGRAMS CATALOG
   =================================================================== */

/* Programs Grid */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: var(--space-6);
}

.program-card {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-base);
}

.program-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.program-header {
    padding: var(--space-6);
    color: white;
    position: relative;
}

.program-level-badge {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
}

.program-header h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-2);
}

.program-code {
    font-family: var(--font-family-mono);
    font-size: var(--text-sm);
    opacity: 0.9;
}

.program-body {
    padding: var(--space-6);
}

.program-info-row {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.program-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.program-modules {
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
}

.program-modules strong {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--ppg-blue-primary);
}

.program-modules ul {
    margin: 0;
    padding-left: var(--space-5);
}

.program-modules li {
    font-size: var(--text-sm);
    margin-bottom: var(--space-1);
}

.program-footer {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}

.program-prereq,
.program-cert,
.program-passing {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.program-actions {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--color-border);
}

/* Program Detail Modal */
.program-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--color-border);
}

.level-badge-large {
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    color: white;
    font-weight: var(--font-bold);
    font-size: var(--text-base);
}

.program-meta-large {
    display: flex;
    gap: var(--space-6);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.program-section {
    margin-bottom: var(--space-6);
}

.program-section h4 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--ppg-blue-primary);
    margin-bottom: var(--space-3);
}

.program-modules-list {
    padding-left: var(--space-6);
}

.program-modules-list li {
    font-size: var(--text-base);
    margin-bottom: var(--space-2);
    line-height: 1.6;
}

/* ===================================================================
   22. SCROLLBAR STYLING
   =================================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ===================================================================
   TIMELINE ACTION BUTTONS (Added Nov 2025)
   =================================================================== */

/* Action buttons container */
.timeline-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Show buttons on hover */
.timeline-item-enhanced:hover .timeline-actions {
    opacity: 1;
}

/* Action button base styles */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* View button */
.btn-action.btn-view:hover {
    background: #E3F2FD;
    color: #1976D2;
}

/* Edit button */
.btn-action.btn-edit:hover {
    background: #FFF3E0;
    color: #F57C00;
}

/* Delete button */
.btn-action.btn-delete:hover {
    background: #FFEBEE;
    color: #D32F2F;
}

/* Mobile: Always show buttons */
@media (max-width: 768px) {
    .timeline-actions {
        opacity: 1;
    }
    
    .btn-action {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Adjust timeline footer to accommodate buttons */
.timeline-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}
