/* ============================================
   CYBERESIST Design System v2
   ============================================ */

/* ===== CSS VARIABLES ===== */
:root {
    /* Primary Colors - Vert foncé */
    --cr-primary: #2d7a5c;
    --cr-primary-dark: #1f5a47;
    --cr-primary-light: #e8f5e9;
    --cr-primary-lighter: #f0f7f3;
    
    /* Sidebar Colors */
    --cr-sidebar-bg: #1a3a34;
    --cr-sidebar-bg-dark: #0f2721;
    --cr-sidebar-hover: rgba(45, 122, 92, 0.4);
    --cr-sidebar-active: rgba(45, 122, 92, 0.6);
    --cr-sidebar-border: rgba(255, 255, 255, 0.08);
    
    /* Severity Colors */
    --cr-critical: #7000ff;
    --cr-high: #e84c3d;
    --cr-medium: #f5a623;
    --cr-low: #27ae60;
    
    /* Status Colors */
    --cr-success: #27ae60;
    --cr-warning: #f5a623;
    --cr-danger: #e84c3d;
    --cr-info: #0085ff;
    
    /* Neutral Colors */
    --cr-white: #ffffff;
    --cr-gray-50: #f9fafb;
    --cr-gray-100: #f3f4f6;
    --cr-gray-200: #e5e7eb;
    --cr-gray-300: #d1d5db;
    --cr-gray-400: #9ca3af;
    --cr-gray-500: #6b7280;
    --cr-gray-600: #4b5563;
    --cr-gray-700: #374151;
    --cr-gray-800: #1f2937;
    
    /* Background */
    --cr-bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #dce2ec 100%);
    
    /* Effects */
    --cr-border-radius: 12px;
    --cr-border-radius-sm: 8px;
    --cr-border-radius-lg: 16px;
    --cr-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --cr-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.08);
    --cr-shadow-lg: 0 10px 25px 0 rgba(0, 0, 0, 0.1);
    --cr-shadow-xl: 0 20px 40px 0 rgba(0, 0, 0, 0.15);
    --cr-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: var(--cr-bg-gradient);
    background-attachment: fixed;
    color: var(--cr-gray-700);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ===== APP LAYOUT ===== */
.cr-app-layout {
    display: flex;
    min-height: 100vh;
}

.cr-main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    padding: 24px;
}

/* ===== SIDEBAR ===== */
.cr-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, var(--cr-sidebar-bg) 0%, var(--cr-sidebar-bg-dark) 100%);
    color: var(--cr-white);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--cr-shadow-lg);
}

.cr-sidebar::-webkit-scrollbar {
    width: 6px;
}

.cr-sidebar::-webkit-scrollbar-thumb {
    background: rgba(45, 122, 92, 0.5);
    border-radius: 3px;
}

.cr-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(45, 122, 92, 0.7);
}

/* Sidebar Header / Logo */
.cr-sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid var(--cr-sidebar-border);
}

.cr-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(45, 122, 92, 0.3), rgba(45, 122, 92, 0.1));
    border-radius: var(--cr-border-radius);
    border: 1px solid rgba(45, 122, 92, 0.4);
    transition: var(--cr-transition);
    text-decoration: none;
    color: var(--cr-white);
}

.cr-logo:hover {
    background: linear-gradient(135deg, rgba(45, 122, 92, 0.4), rgba(45, 122, 92, 0.2));
    transform: translateY(-2px);
    color: var(--cr-white);
    text-decoration: none;
}

.cr-logo-icon {
    font-size: 28px;
    animation: logoFloat 3s ease-in-out infinite;
}

.cr-logo img {
    max-height: 36px;
    width: auto;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
}

.cr-logo-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Sidebar Navigation */
.cr-sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    overflow-y: auto;
}

.cr-nav-section {
    margin-top: 4px;
}

.cr-nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.45);
    padding: 16px 16px 10px;
    background-color: rgba(0, 0, 0, 0.15);
    margin: 16px -12px 10px;
    padding-left: 20px;
    border-radius: 6px;
}

.cr-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    transition: var(--cr-transition);
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 2px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.cr-nav-item i {
    width: 20px;
    text-align: center;
    opacity: 0.8;
    font-size: 15px;
    flex-shrink: 0;
}

.cr-nav-item:hover {
    background-color: var(--cr-sidebar-hover);
    color: var(--cr-white);
    padding-left: 18px;
    text-decoration: none;
}

.cr-nav-item.active {
    background: linear-gradient(90deg, rgba(45, 122, 92, 0.6), rgba(45, 122, 92, 0.2));
    color: var(--cr-white);
    border-left: 3px solid #4ade80;
    padding-left: 11px;
}

.cr-nav-item.active i {
    opacity: 1;
    color: #4ade80;
}

.cr-nav-divider {
    height: 1px;
    background: var(--cr-sidebar-border);
    margin: 12px 0;
}

/* User type badge */
.cr-user-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.2), rgba(245, 166, 35, 0.1));
    border: 1px solid rgba(245, 166, 35, 0.3);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #fbbf24;
    margin: 0 0 12px 0;
}

.cr-user-type-badge.client {
    background: linear-gradient(135deg, rgba(45, 122, 92, 0.2), rgba(45, 122, 92, 0.1));
    border-color: rgba(45, 122, 92, 0.3);
    color: #4ade80;
}

.cr-user-type-badge i {
    font-size: 12px;
}

/* Sidebar Bottom */
.cr-sidebar-bottom {
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid var(--cr-sidebar-border);
}

.cr-bug-report {
    background: linear-gradient(90deg, #f5a623, #e8860a) !important;
    margin: 8px 0;
    justify-content: center;
    color: white !important;
}

.cr-bug-report:hover {
    background: linear-gradient(90deg, #e8860a, #d4700a) !important;
    padding-left: 14px !important;
}

/* User Menu */
.cr-user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--cr-transition);
    cursor: pointer;
    text-decoration: none;
    margin-top: 8px;
}

.cr-user-menu:hover {
    background-color: var(--cr-sidebar-hover);
    color: var(--cr-white);
    text-decoration: none;
}

.cr-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.cr-user-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cr-primary), var(--cr-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
}

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

.cr-user-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cr-user-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* Sidebar Dropdown Override */
.cr-sidebar .dropdown-menu {
    background: var(--cr-sidebar-bg);
    border: 1px solid var(--cr-sidebar-border);
    box-shadow: var(--cr-shadow-lg);
    padding: 8px;
}

.cr-sidebar .dropdown-menu .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 6px;
    transition: var(--cr-transition);
}

.cr-sidebar .dropdown-menu .dropdown-item:hover {
    background-color: var(--cr-sidebar-hover);
    color: white;
}

.cr-sidebar .dropdown-menu .dropdown-item i {
    width: 20px;
}

.cr-sidebar .dropdown-menu .dropdown-divider {
    border-color: var(--cr-sidebar-border);
    margin: 8px 0;
}

/* ===== LOGIN PAGE ===== */
.cr-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #1a3a34 0%, #0f2721 50%, #1a3a34 100%);
    position: relative;
    overflow: hidden;
}

.cr-login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(45, 122, 92, 0.1) 0%, transparent 50%);
    animation: loginBgPulse 15s ease-in-out infinite;
}

@keyframes loginBgPulse {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}

.cr-login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.cr-login-card {
    background: var(--cr-white);
    border-radius: 20px;
    box-shadow: var(--cr-shadow-xl);
    overflow: hidden;
}

.cr-login-header {
    background: linear-gradient(135deg, var(--cr-primary) 0%, var(--cr-primary-dark) 100%);
    padding: 32px;
    text-align: center;
}

.cr-login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: white;
    margin-bottom: 8px;
}

.cr-login-logo i {
    font-size: 36px;
    animation: logoFloat 3s ease-in-out infinite;
}

.cr-login-logo img {
    max-height: 48px;
    width: auto;
}

.cr-login-logo span {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
}

.cr-login-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.cr-login-body {
    padding: 32px;
}

.cr-login-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--cr-gray-800);
    text-align: center;
    margin-bottom: 28px;
}

.cr-login-form-group {
    margin-bottom: 20px;
    position: relative;
}

.cr-login-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--cr-gray-600);
    margin-bottom: 8px;
}

.cr-login-input-wrapper {
    position: relative;
}

.cr-login-input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cr-gray-400);
    font-size: 16px;
    transition: var(--cr-transition);
    pointer-events: none;
}

.cr-login-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--cr-gray-200);
    border-radius: 12px;
    font-size: 15px;
    transition: var(--cr-transition);
    background: var(--cr-gray-50);
}

.cr-login-input:focus {
    outline: none;
    border-color: var(--cr-primary);
    background: var(--cr-white);
    box-shadow: 0 0 0 4px rgba(45, 122, 92, 0.1);
}

.cr-login-input:focus + i,
.cr-login-input-wrapper:focus-within i {
    color: var(--cr-primary);
}

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

.cr-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.cr-login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cr-gray-600);
    cursor: pointer;
}

.cr-login-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--cr-primary);
}

.cr-login-forgot {
    color: var(--cr-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--cr-transition);
}

.cr-login-forgot:hover {
    color: var(--cr-primary-dark);
    text-decoration: underline;
}

.cr-login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--cr-primary) 0%, var(--cr-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--cr-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cr-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 122, 92, 0.35);
}

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

.cr-login-footer {
    text-align: center;
    padding: 20px 32px 28px;
    border-top: 1px solid var(--cr-gray-100);
    color: var(--cr-gray-500);
    font-size: 13px;
}

.cr-login-footer a {
    color: var(--cr-primary);
    text-decoration: none;
    font-weight: 600;
}

.cr-login-footer a:hover {
    text-decoration: underline;
}

/* ===== PAGE STRUCTURE ===== */
.cr-page-header {
    background: var(--cr-white);
    padding: 24px 28px;
    border-radius: var(--cr-border-radius);
    box-shadow: var(--cr-shadow);
    margin-bottom: 24px;
}

.cr-page-title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 24px;
    font-weight: 700;
    color: var(--cr-gray-800);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.cr-page-title i {
    color: var(--cr-primary);
}

.cr-page-subtitle {
    color: var(--cr-gray-500);
    font-size: 14px;
    margin: 0;
}

/* Welcome Banner */
.cr-welcome-banner {
    background: linear-gradient(135deg, var(--cr-primary) 0%, var(--cr-primary-dark) 100%);
    border-radius: 16px;
    padding: 32px;
    color: white;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.cr-welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cr-welcome-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
}

.cr-welcome-subtitle {
    font-size: 16px;
    opacity: 0.9;
    position: relative;
    margin: 0;
}

/* ===== CARDS ===== */
.cr-card {
    background: var(--cr-white);
    border-radius: var(--cr-border-radius);
    box-shadow: var(--cr-shadow);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--cr-gray-100);
    transition: var(--cr-transition);
}

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

.cr-card-static:hover {
    transform: none;
}

.cr-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cr-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--cr-gray-800);
    margin: 0;
    letter-spacing: -0.3px;
}

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

.cr-stat-card {
    background: white;
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--cr-shadow);
    transition: var(--cr-transition);
    border: 1px solid var(--cr-gray-100);
}

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

.cr-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

.cr-stat-icon.green {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
}

.cr-stat-icon.blue {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.cr-stat-icon.orange {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.cr-stat-icon.purple {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    color: #7c3aed;
}

.cr-stat-icon.red {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.cr-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--cr-gray-800);
    margin-bottom: 4px;
}

.cr-stat-label {
    font-size: 14px;
    color: var(--cr-gray-500);
}

/* Quick Actions */
.cr-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.cr-action-card {
    background: white;
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--cr-shadow);
    transition: var(--cr-transition);
    border: 1px solid var(--cr-gray-100);
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 16px;
}

.cr-action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cr-shadow-lg);
    border-color: var(--cr-primary);
    text-decoration: none;
    color: inherit;
}

.cr-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cr-primary), var(--cr-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.cr-action-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--cr-gray-800);
    margin-bottom: 4px;
}

.cr-action-content p {
    font-size: 13px;
    color: var(--cr-gray-500);
    margin: 0;
}

/* ===== BUTTONS ===== */
.cr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--cr-transition);
    box-shadow: var(--cr-shadow-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.cr-btn:active {
    transform: scale(0.98);
}

.cr-btn-primary {
    background: linear-gradient(135deg, var(--cr-primary) 0%, var(--cr-primary-dark) 100%);
    color: var(--cr-white);
}

.cr-btn-primary:hover {
    box-shadow: var(--cr-shadow-lg);
    transform: translateY(-2px);
    color: var(--cr-white);
    text-decoration: none;
}

.cr-btn-secondary {
    background-color: var(--cr-gray-100);
    color: var(--cr-gray-700);
    border: 1.5px solid var(--cr-gray-300);
}

.cr-btn-secondary:hover {
    background-color: var(--cr-gray-200);
    border-color: var(--cr-gray-400);
    box-shadow: var(--cr-shadow);
    transform: translateY(-2px);
}

.cr-btn-danger {
    background: linear-gradient(135deg, #f24545 0%, #d32f2f 100%);
    color: var(--cr-white);
}

.cr-btn-danger:hover {
    box-shadow: 0 8px 20px rgba(242, 69, 69, 0.3);
    transform: translateY(-2px);
    color: var(--cr-white);
}

.cr-btn-warning {
    background: linear-gradient(135deg, #f5a623 0%, #e8860a 100%);
    color: var(--cr-white);
}

.cr-btn-warning:hover {
    box-shadow: 0 8px 20px rgba(245, 166, 35, 0.3);
    transform: translateY(-2px);
    color: var(--cr-white);
}

.cr-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.cr-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* Icon buttons */
.cr-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--cr-gray-100);
    border: 1px solid var(--cr-gray-200);
    color: var(--cr-gray-600);
    transition: var(--cr-transition);
    cursor: pointer;
}

.cr-icon-btn:hover {
    background: var(--cr-gray-200);
    color: var(--cr-gray-800);
}

/* ===== TABS ===== */
.cr-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cr-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    background-color: var(--cr-white);
    border: 1.5px solid var(--cr-gray-300);
    color: var(--cr-gray-600);
    transition: var(--cr-transition);
    box-shadow: var(--cr-shadow-sm);
    cursor: pointer;
    text-decoration: none;
}

.cr-tab:hover {
    border-color: var(--cr-primary);
    color: var(--cr-primary);
    box-shadow: var(--cr-shadow);
    transform: translateY(-2px);
    text-decoration: none;
}

.cr-tab.active {
    background: linear-gradient(135deg, var(--cr-primary) 0%, var(--cr-primary-dark) 100%);
    border-color: var(--cr-primary);
    color: var(--cr-white);
    box-shadow: var(--cr-shadow);
}

/* ===== FORMS ===== */
.cr-form-group {
    margin-bottom: 20px;
}

.cr-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--cr-gray-700);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.cr-form-input,
.cr-form-select,
.cr-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--cr-gray-300);
    border-radius: 10px;
    font-size: 14px;
    transition: var(--cr-transition);
    background-color: var(--cr-white);
}

.cr-form-input:focus,
.cr-form-select:focus,
.cr-form-textarea:focus {
    outline: none;
    border-color: var(--cr-primary);
    box-shadow: 0 0 0 3px rgba(45, 122, 92, 0.1);
}

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

/* ===== BADGES ===== */
.cr-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.cr-badge-critical {
    background: linear-gradient(135deg, #7000ff 0%, #5a00cc 100%);
    color: var(--cr-white);
}

.cr-badge-high {
    background: linear-gradient(135deg, #e84c3d 0%, #c1392d 100%);
    color: var(--cr-white);
}

.cr-badge-medium {
    background: linear-gradient(135deg, #f5a623 0%, #e8860a 100%);
    color: var(--cr-white);
}

.cr-badge-low {
    background: linear-gradient(135deg, #27ae60 0%, #1d7a4a 100%);
    color: var(--cr-white);
}

/* Status badges */
.cr-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.cr-status-pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.cr-status-progress {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #0c4a6e;
}

.cr-status-completed {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

/* ===== TABLES ===== */
.cr-table {
    width: 100%;
    border-collapse: collapse;
}

.cr-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cr-gray-500);
    border-bottom: 2px solid var(--cr-gray-200);
}

.cr-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--cr-gray-100);
    font-size: 14px;
}

.cr-table tbody tr {
    transition: var(--cr-transition);
}

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

/* ===== GRID ===== */
.cr-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.cr-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cr-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
    .cr-grid-4 { grid-template-columns: repeat(3, 1fr); }
    .cr-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1200px) {
    .cr-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .cr-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .cr-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .cr-quick-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .cr-grid-4,
    .cr-grid-3,
    .cr-grid-2 { grid-template-columns: 1fr; }
    
    .cr-main-content {
        margin-left: 0;
        padding: 16px;
    }
    
    .cr-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .cr-sidebar.open {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .cr-stats-grid { grid-template-columns: 1fr; }
    .cr-quick-actions { grid-template-columns: 1fr; }
    
    .cr-welcome-banner {
        padding: 24px;
    }
    
    .cr-welcome-title {
        font-size: 22px;
    }
}

/* ===== UTILITIES ===== */
.cr-text-primary { color: var(--cr-primary); }
.cr-text-success { color: var(--cr-success); }
.cr-text-warning { color: var(--cr-warning); }
.cr-text-danger { color: var(--cr-danger); }
.cr-text-muted { color: var(--cr-gray-500); }

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

/* ===== PURPLE / CRITICAL UTILITIES ===== */
/* Classes Bootstrap-like pour le violet (vulnérabilités critiques) */

.bg-purple { 
    background-color: var(--cr-critical) !important; 
}

.bg-purple-subtle { 
    background-color: rgba(112, 0, 255, 0.1) !important; 
}

.border-purple { 
    border-color: var(--cr-critical) !important; 
}

.text-purple { 
    color: var(--cr-critical) !important; 
}

/* Variantes avec opacité */
.bg-purple-10 { background-color: rgba(112, 0, 255, 0.1) !important; }
.bg-purple-25 { background-color: rgba(112, 0, 255, 0.25) !important; }
.bg-purple-50 { background-color: rgba(112, 0, 255, 0.5) !important; }
.bg-purple-75 { background-color: rgba(112, 0, 255, 0.75) !important; }

/* ===== NAV CARDS (titre de section dans sidebar) ===== */
.cr-nav-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin: 0 0 8px 0;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(45, 122, 92, 0.3), rgba(45, 122, 92, 0.1));
    border: 1px solid rgba(45, 122, 92, 0.3);
}

.cr-nav-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.cr-nav-card-content {
    flex: 1;
    min-width: 0;
}

.cr-nav-card-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.cr-nav-card-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card colors */
.cr-nav-card.orange {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.3), rgba(245, 166, 35, 0.1));
    border-color: rgba(245, 166, 35, 0.3);
}

.cr-nav-card.blue {
    background: linear-gradient(135deg, rgba(0, 133, 255, 0.3), rgba(0, 133, 255, 0.1));
    border-color: rgba(0, 133, 255, 0.3);
}

.cr-nav-card.red {
    background: linear-gradient(135deg, rgba(232, 76, 61, 0.3), rgba(232, 76, 61, 0.1));
    border-color: rgba(232, 76, 61, 0.3);
}

.cr-nav-card.green {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.3), rgba(39, 174, 96, 0.1));
    border-color: rgba(39, 174, 96, 0.3);
}

.cr-nav-card.purple {
    background: linear-gradient(135deg, rgba(111, 66, 193, 0.3), rgba(111, 66, 193, 0.1));
    border-color: rgba(111, 66, 193, 0.3);
}

/* ===== NAV BADGES ===== */
.cr-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    margin-left: auto;
}

.cr-nav-badge.danger { background: var(--cr-danger); }
.cr-nav-badge.success { background: var(--cr-success); }
.cr-nav-badge.warning { background: var(--cr-warning); color: #1f2937; }
.cr-nav-badge.info { background: var(--cr-info); }

/* ===== NAV ITEM COLORED ===== */
.cr-nav-item-colored {
    position: relative;
    padding-left: 14px;
}

.cr-nav-item-colored::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    border-radius: 0 4px 4px 0;
    background: var(--cr-primary);
    opacity: 0;
    transition: var(--cr-transition);
}

.cr-nav-item-colored:hover::before,
.cr-nav-item-colored.active::before {
    opacity: 1;
}

.cr-nav-item-colored.blue::before { background: var(--cr-info); }
.cr-nav-item-colored.red::before { background: var(--cr-danger); }
.cr-nav-item-colored.orange::before { background: var(--cr-warning); }
.cr-nav-item-colored.green::before { background: var(--cr-success); }
.cr-nav-item-colored.cyan::before { background: #17a2b8; }

/* ===== NAV ITEM HIGHLIGHT ===== */
.cr-nav-item-highlight {
    background: linear-gradient(90deg, var(--cr-primary), var(--cr-primary-dark)) !important;
    color: white !important;
    justify-content: center;
    margin: 4px 0;
}

.cr-nav-item-highlight:hover {
    transform: translateX(4px);
    padding-left: 14px !important;
}

.cr-nav-item-highlight.danger {
    background: linear-gradient(90deg, var(--cr-danger), #c1392d) !important;
}

/* ===== NAV DIVIDER SMALL ===== */
.cr-nav-divider-sm {
    height: 1px;
    background: var(--cr-sidebar-border);
    margin: 8px 0;
}

/* ===== NAV OVERLAY ===== */
.cr-nav-overlay {
    position: absolute;
    top: 0;
    left: -12px;
    right: -12px;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.cr-nav-overlay-content {
    text-align: center;
    color: white;
    padding: 16px;
}

.cr-nav-overlay-content i {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.cr-nav-overlay-content p {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

/* ===== NAV SUBMENU ===== */
.cr-nav-submenu {
    margin-bottom: 2px;
}

.cr-nav-item-expandable {
    position: relative;
}

.cr-nav-chevron {
    font-size: 10px;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.cr-nav-item-expandable[aria-expanded="true"] .cr-nav-chevron {
    transform: rotate(180deg);
}

.cr-nav-submenu-items {
    padding: 4px 0 4px 12px;
    margin-left: 8px;
    border-left: 2px solid var(--cr-sidebar-border);
}

.cr-nav-subitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    transition: var(--cr-transition);
    text-decoration: none;
    margin-bottom: 2px;
}

.cr-nav-subitem i {
    width: 16px;
    text-align: center;
    font-size: 12px;
}

.cr-nav-subitem:hover {
    background-color: var(--cr-sidebar-hover);
    color: white;
    text-decoration: none;
}

.cr-nav-subitem.active {
    background: linear-gradient(90deg, rgba(45, 122, 92, 0.4), rgba(45, 122, 92, 0.1));
    color: white;
}

/* ===== CLIENT INDICATOR ===== */
.cr-client-indicator {
    background: linear-gradient(135deg, rgba(0, 133, 255, 0.2), rgba(0, 133, 255, 0.05));
    border: 1px solid rgba(0, 133, 255, 0.3);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.cr-client-indicator-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.cr-client-indicator-label i {
    margin-right: 4px;
}

.cr-client-indicator-name {
    font-size: 13px;
    font-weight: 700;
    color: #60a5fa;
    word-break: break-word;
}

/* ===== CONTEXT SWITCHER ===== */
.cr-context-switcher {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.cr-context-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transition: var(--cr-transition);
}

.cr-context-btn:hover {
    background: rgba(45, 122, 92, 0.3);
    border-color: var(--cr-primary);
    color: white;
    text-decoration: none;
}

.cr-context-btn.active {
    background: linear-gradient(135deg, var(--cr-primary), var(--cr-primary-dark));
    border-color: var(--cr-primary);
    color: white;
}

.cr-context-btn.azure.active {
    background: linear-gradient(135deg, var(--cr-info), #0066cc);
    border-color: var(--cr-info);
}

.cr-context-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
}

.cr-context-btn.active .cr-context-badge {
    background: rgba(255, 255, 255, 0.3);
}

.cr-context-indicator {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.cr-context-indicator i {
    margin-right: 4px;
}

/* Les liens deviennent blancs/gris clair */
.cr-sidebar-nav .nav-link,
.cr-sidebar-nav .nav-link.link-body-emphasis {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Active = blanc avec fond vert */
.cr-sidebar-nav .nav-link.active {
    color: white !important;
    background: linear-gradient(90deg, rgba(45, 122, 92, 0.4), rgba(45, 122, 92, 0.1)) !important;
}