/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #e02741;
    --primary-dark: #e02741;
    --secondary-color: #2f3542;
    --accent-color: #ff6b7a;
    --text-primary: #2f3542;
    --text-secondary: #747d8c;
    --background-dark: #1a1a1a;
    --background-card: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(255, 71, 87, 0.3);
    --border-radius: 12px;
    --border-radius-large: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

/* Dark theme variables */
[data-theme="dark"] {
    --text-primary: #ffffff;
    --text-secondary: #b0b8c1;
    --background-dark: #1a1a1a;
    --background-card: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(0, 0, 0, 0.2);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Light theme variables */
[data-theme="light"] {
    --text-primary: #2f3542;
    --text-secondary: #747d8c;
    --background-dark: #ffffff;
    --background-card: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(0, 0, 0, 0.1);
}

/* Device-aware overrides via body classes added by scripts/responsive.js */
body.mobile {
    --sidebar-width: 100%;
    --content-padding: 1rem;
}

body.desktop {
    --sidebar-width: 280px;
    --content-padding: 2rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2d2d2d 100%);
    min-height: 100vh;
    overflow-x: auto;
}

/* Custom Horizontal Scrollbar */
body::-webkit-scrollbar:horizontal {
    height: 12px;
}

body::-webkit-scrollbar-track:horizontal {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin: 0 10px;
}

body::-webkit-scrollbar-thumb:horizontal {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

body::-webkit-scrollbar-thumb:horizontal:hover {
    background: linear-gradient(90deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

body::-webkit-scrollbar-corner {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
}

/* ===== DASHBOARD CONTAINER ===== */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width, 280px);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

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

.logo h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--glass-bg);
}

/* ===== SIDEBAR NAVIGATION ===== */
.sidebar-nav {
    /* Layout Properties */
    flex: 1;
    padding: 1rem 0;
    
    /* Scroll Properties */
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    
    /* Firefox Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

/* Custom Scrollbar for Webkit Browsers (Chrome, Safari, Edge) */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
    opacity: 0.7;
    transition: var(--transition);
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
    opacity: 1;
}

/* Navigation List */
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Navigation Items */
.nav-item {
    margin-bottom: 0.5rem;
}

/* Navigation Links */
.nav-link {
    /* Layout Properties */
    display: flex;
    align-items: center;
    gap: 1rem;
    
    /* Spacing Properties */
    padding: 1rem 1.5rem;
    margin-right: 1rem;
    
    /* Visual Properties */
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    
    /* Animation Properties */
    transition: var(--transition);
}

/* Navigation Link Hover State */
.nav-link:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
    transform: translateX(2px);
}

/* Active Navigation Link */
.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: var(--shadow-glow);
    transform: translateX(4px);
}

/* Navigation Link Icons */
.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* ===== SIDEBAR FOOTER ===== */
.sidebar-footer {
    /* Layout Properties */
    padding: 1.5rem;
    
    /* Visual Properties */
    border-top: 1px solid var(--border-color);
}

/* Logout Button */
.btn-logout {
    /* Layout Properties */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    
    /* Spacing Properties */
    padding: 0.875rem 1rem;
    
    /* Visual Properties */
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    
    /* Typography Properties */
    font-size: 0.9rem;
    font-weight: 500;
    
    /* Interaction Properties */
    cursor: pointer;
    transition: var(--transition);
}

/* Logout Button Hover State */
.btn-logout:hover {
    background: var(--error-color);
    border-color: var(--error-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width, 280px);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-home {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--primary-color);
}

.btn-home:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .user-menu-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

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

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 100;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
}

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

[data-theme="light"] .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.1);
}

.dropdown-item:first-child {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* ===== CONTENT WRAPPER ===== */
.content-wrapper {
    flex: 1;
    padding: var(--content-padding, 2rem);
    overflow-y: auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

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

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-large);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-actions h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.action-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.action-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.action-card span {
    font-weight: 500;
    text-align: center;
}

/* ===== FORMS ===== */
.profile-form,
.password-form {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-large);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.875rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

/* Enhanced Project Type Select Styling */
.form-group select {
    padding: 0.875rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23747d8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

.form-group select:hover {
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    background-color: rgba(255, 255, 255, 0.1);
}

.form-group select option {
    background: var(--background-dark);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Project Type Select Enhancements */
.form-group select#projectType,
.form-group select#editProjectType {
    background: linear-gradient(135deg, var(--glass-bg) 0%, var(--background-card) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
}

.form-group select#projectType:hover,
.form-group select#editProjectType:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--background-card) 0%, var(--glass-bg) 100%);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.15);
    transform: translateY(-1px);
}

.form-group select#projectType:focus,
.form-group select#editProjectType:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--background-card);
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1), 0 4px 12px rgba(255, 71, 87, 0.15);
    transform: translateY(-1px);
}

.form-group select#projectType.success,
.form-group select#editProjectType.success {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, var(--background-card) 100%);
}

.form-group select#projectType.error,
.form-group select#editProjectType.error {
    border-color: var(--error-color);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, var(--background-card) 100%);
    animation: shake 0.3s ease-in-out;
}

/* Project Type Option Icons */
.form-group select#projectType option,
.form-group select#editProjectType option {
    padding: 12px 16px;
    font-weight: 500;
    background-color: var(--background-dark);
    color: var(--text-primary);
}

/* Shake animation for validation errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Enhanced Project Description Textarea Styling */
.form-group textarea {
    padding: 0.875rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.6;
}

.form-group textarea:hover {
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.08);
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Project Type Icons */
#projectType {
    position: relative;
}

.project-type-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
}

#projectType.has-icon {
    padding-left: 3rem;
}

/* Character Counter for Description */
.char-counter {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 0.25rem;
    transition: var(--transition);
}

.char-counter.warning {
    color: var(--warning-color);
}

.char-counter.error {
    color: var(--error-color);
}

/* Project Type Validation */
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group.success select,
.form-group.success textarea {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.field-feedback {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.field-feedback.error {
    color: var(--error-color);
}

.field-feedback.success {
    color: var(--success-color);
}

.field-feedback i {
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* ===== DANGER ZONE ===== */
.danger-zone {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: var(--border-radius-large);
    padding: 1.5rem;
}

.danger-zone h3 {
    color: var(--error-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.danger-actions {
    display: flex;
    gap: 1rem;
}

/* ===== AI ANALYTICS ===== */
.analytics-content {
    padding: 0;
}

.analytics-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.analytics-controls {
    display: flex;
    gap: 1rem;
}

.analytics-filters select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9rem;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.analytics-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.analytics-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.analytics-card.full-width {
    grid-column: 1 / -1;
}

.analytics-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.analytics-card .card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.analytics-card .card-header i {
    font-size: 1.2rem;
    opacity: 0.8;
}

.analytics-card .card-content {
    padding: 1.5rem;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1rem;
}

.metric:last-child {
    margin-bottom: 0;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

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

.pattern-list, .action-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pattern-item, .action-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.pattern-name, .action-name {
    font-weight: 500;
    color: var(--text-color);
}

.pattern-value, .action-count {
    font-weight: 600;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.security-metrics, .learning-status {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-item, .status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.security-item:last-child, .status-item:last-child {
    border-bottom: none;
}

.security-label, .status-label {
    font-weight: 500;
    color: var(--text-color);
}

.security-value, .status-value {
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.security-value {
    background: var(--success-light);
    color: var(--success-color);
}

.status-value {
    background: var(--info-light);
    color: var(--info-color);
}

.timeline-chart {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Engagement Breakdown */
.engagement-breakdown {
    margin: 15px 0;
}

.engagement-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.engagement-level:last-child {
    border-bottom: none;
}

.level-name {
    font-weight: 500;
    color: var(--text-primary);
}

.level-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.timeline-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.timeline-stats span {
    font-size: 14px;
    color: var(--text-secondary);
}

.chart-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.chart-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.chart-placeholder p {
    margin: 0;
    font-size: 1.1rem;
}

/* Dark theme adjustments for analytics */
[data-theme="dark"] .analytics-card {
    background: var(--card-bg-dark);
    border-color: var(--border-dark);
}

[data-theme="dark"] .analytics-toolbar {
    background: var(--card-bg-dark);
    border-color: var(--border-dark);
}

[data-theme="dark"] .pattern-item,
[data-theme="dark"] .action-item {
    background: var(--bg-dark);
    border-color: var(--border-dark);
}

/* Responsive design for analytics */
@media (max-width: 768px) {
    .analytics-toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .analytics-controls {
        justify-content: center;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .metric {
        margin-bottom: 0.75rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
}

/* ===== USERS TABLE ===== */
.users-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-large);
    overflow: hidden;
}

.users-toolbar {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.users-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.users-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.users-actions .btn i.fa-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.users-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.users-table-container {
    overflow-x: auto;
}

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

.users-table th,
.users-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.users-table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

[data-theme="light"] .users-table th {
    background: rgba(0, 0, 0, 0.05);
}

.users-table td {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.users-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .users-table tr:hover {
    background: rgba(0, 0, 0, 0.05);
}

.user-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.user-status.active {
    background: rgba(40, 167, 69, 0.2);
    color: var(--success-color);
}

.user-status.inactive {
    background: rgba(220, 53, 69, 0.2);
    color: var(--error-color);
}

.user-type {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.user-type.admin {
    background: rgba(255, 71, 87, 0.2);
    color: var(--primary-color);
}

.user-type.user {
    background: rgba(23, 162, 184, 0.2);
    color: var(--info-color);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

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

.btn-edit:hover {
    background: #138496;
}

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

.btn-delete:hover {
    background: #c82333;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-large);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

[data-theme="light"] .modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.modal-body {
    padding: 1.5rem;
}

/* ===== NOTIFICATIONS ===== */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    transform: translateX(100%);
    transition: var(--transition);
    animation: slideInRight 0.3s ease-out forwards;
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--error-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification.info {
    border-left: 4px solid var(--primary-color);
}

.notification i {
    font-size: 1.2rem;
}

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

.notification.error i {
    color: var(--error-color);
}

.notification.warning i {
    color: var(--warning-color);
}

.notification.info i {
    color: var(--primary-color);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

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

    .actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        padding: 0.75rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .header-right {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .btn-home {
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .content-wrapper {
        padding: 1rem;
    }

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

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .users-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: none;
    }

    .users-table th,
    .users-table td {
        padding: 0.75rem;
    }

    .modal {
        width: 95%;
        margin: 1rem;
    }

    .reports-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .filter-controls {
        flex-direction: column;
    }

    .action-controls {
        justify-content: center;
    }

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

    .admin-reports-table-container {
        overflow-x: auto;
    }

    .admin-reports-table {
        min-width: 800px;
    }

    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

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

    .dashboard-header {
        position: relative;
        padding: 0.75rem 15px;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .stat-card {
        padding: 1rem;
        text-align: center;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .action-card {
        padding: 1rem;
        text-align: center;
    }

    .profile-form,
    .password-form {
        padding: 1.5rem;
    }

    .danger-actions {
        flex-direction: column;
        gap: 1rem;
    }

    /* تحسينات إضافية للموبايل */
    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        display: block;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
        padding: 1rem;
        width: 100%;
        border-radius: 8px;
    }

    .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .modal {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-content {
        padding: 1rem;
    }

    /* تحسين الجداول للموبايل */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.5rem;
        white-space: nowrap;
    }

    /* تحسين البطاقات للموبايل */
    .project-card,
    .report-card {
        margin-bottom: 1rem;
        padding: 1rem;
    }

    .project-card-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .project-card-actions .btn {
        width: 100%;
    }
}

/* ===== MOBILE MENU TOGGLE ===== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: var(--bg-secondary);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
    }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.admin-only {
    display: none;
}

.admin-only.show {
    display: block;
}

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

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.project-card-actions {
    display: flex;
    gap: 0.5rem;
}

.project-card-actions .btn {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.7;
}

.empty-state h4 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ===== PLACEHOLDER IMAGE ===== */
.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    color: var(--text-secondary);
}

/* ===== REPORTS SECTION ===== */
.report-form-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-large);
    padding: 2rem;
    margin-bottom: 2rem;
}

.report-form .form-group textarea {
    padding: 0.875rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.report-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.report-form .form-group select {
    padding: 0.875rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.report-form .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.my-reports-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-large);
    padding: 2rem;
}

.my-reports-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.reports-filter {
    margin-bottom: 1.5rem;
}

.reports-filter select {
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.reports-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-item {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.report-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.report-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.report-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.report-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.report-status.pending {
    background: rgba(255, 193, 7, 0.2);
    color: var(--warning-color);
}

.report-status.in-progress {
    background: rgba(23, 162, 184, 0.2);
    color: var(--info-color);
}

.report-status.resolved {
    background: rgba(40, 167, 69, 0.2);
    color: var(--success-color);
}

.report-status.closed {
    background: rgba(108, 117, 125, 0.2);
    color: var(--text-secondary);
}

/* ===== ADMIN REPORTS MANAGEMENT ===== */
.reports-management {
    padding: 0;
}

.reports-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.filter-controls select {
    padding: 0.75rem 1rem;
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 150px;
    cursor: pointer;
}

.filter-controls select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.filter-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.action-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.reports-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 0;
}

.admin-reports-table-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-large);
    overflow: auto;
    max-height: 500px;
    min-height: 400px;
    width: 100%;
    max-width: 1400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 1rem auto;
    position: relative;
    resize: both;
    cursor: auto;
}

/* Scrollbar Styling */
.admin-reports-table-container::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

.admin-reports-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-reports-table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    min-height: 40px;
    min-width: 40px;
}

.admin-reports-table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
    transform: scale(1.1);
}

.admin-reports-table-container::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: scale(0.95);
}

.admin-reports-table-container::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* إضافة مؤشر تغيير الحجم */
.admin-reports-table-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(-45deg, transparent 0%, transparent 40%, var(--primary-color) 40%, var(--primary-color) 60%, transparent 60%);
    cursor: nw-resize;
    z-index: 10;
    border-bottom-right-radius: var(--border-radius-large);
}

.admin-reports-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1300px;
    font-size: 0.95rem;
    table-layout: fixed;
    background: rgba(255, 255, 255, 0.02);
}

/* تحسين التمرير السلس */
.admin-reports-table-container {
    scroll-behavior: smooth;
}

/* إضافة مؤشرات التمرير */
.admin-reports-table-container:hover::-webkit-scrollbar-thumb {
    opacity: 1;
}

.admin-reports-table-container::-webkit-scrollbar-thumb {
    opacity: 0.7;
}

/* تحسين الاستجابة للمس */
.admin-reports-table-container {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.admin-reports-table th,
.admin-reports-table td {
    padding: 1rem 0.8rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: middle;
    word-wrap: break-word;
}

.admin-reports-table th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--primary-color);
}

.admin-reports-table td {
    font-size: 0.85rem;
    transition: background-color 0.2s ease;
}

.admin-reports-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.admin-reports-table th:nth-child(1),
.admin-reports-table td:nth-child(1) { width: 12%; }
.admin-reports-table th:nth-child(2),
.admin-reports-table td:nth-child(2) { width: 10%; }
.admin-reports-table th:nth-child(3),
.admin-reports-table td:nth-child(3) { width: 20%; }
.admin-reports-table th:nth-child(4),
.admin-reports-table td:nth-child(4) { width: 12%; }
.admin-reports-table th:nth-child(5),
.admin-reports-table td:nth-child(5) { width: 10%; }
.admin-reports-table th:nth-child(6),
.admin-reports-table td:nth-child(6) { width: 10%; }
.admin-reports-table th:nth-child(7),
.admin-reports-table td:nth-child(7) { width: 12%; }
.admin-reports-table th:nth-child(8),
.admin-reports-table td:nth-child(8) { width: 14%; text-align: center; }

.admin-reports-table .action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.admin-reports-table .action-buttons .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    min-width: auto;
    border-radius: 4px;
}

/* شريط التنقل السفلي */
.admin-reports-table-container::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(90deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        rgba(118, 75, 162, 0.1) 50%, 
        rgba(102, 126, 234, 0.1) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: var(--border-radius-large);
    border-bottom-right-radius: var(--border-radius-large);
    z-index: 5;
    pointer-events: none;
}



.admin-reports-table {
    margin-bottom: 0;
}

.admin-reports-table th {
    background: var(--background-card);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-reports-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.admin-reports-table tbody tr:hover {
    background: var(--background-card);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.admin-reports-table th:first-child,
.admin-reports-table td:first-child {
    text-align: center;
    max-width: 80px;
}

.admin-reports-table th:last-child,
.admin-reports-table td:last-child {
    text-align: center;
    max-width: 120px;
}

.priority-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-badge.critical {
    background: rgba(220, 53, 69, 0.2);
    color: var(--error-color);
}

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

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

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

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

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

.btn-info:hover {
    background: #138496;
    transform: translateY(-1px);
}

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

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning-color);
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

/* ===== AI REPORTS ANALYTICS STYLES ===== */
#ai-reports .analytics-content {
    margin-top: 1.5rem;
}

#ai-reports .analytics-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

#ai-reports .analytics-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

#ai-reports .analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

#ai-reports .analytics-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

#ai-reports .analytics-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

#ai-reports .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

#ai-reports .card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

#ai-reports .card-header i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

#ai-reports .card-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#ai-reports .metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 71, 87, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 71, 87, 0.1);
}

#ai-reports .metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

#ai-reports .metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

#ai-reports .alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#ai-reports .alert-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border-left: 4px solid;
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition);
}

#ai-reports .alert-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

#ai-reports .alert-item.alert-danger {
    border-left-color: var(--error-color);
    background: rgba(220, 53, 69, 0.05);
}

#ai-reports .alert-item.alert-warning {
    border-left-color: var(--warning-color);
    background: rgba(255, 193, 7, 0.05);
}

#ai-reports .alert-item.alert-info {
    border-left-color: var(--info-color);
    background: rgba(23, 162, 184, 0.05);
}

#ai-reports .alert-item.alert-success {
    border-left-color: var(--success-color);
    background: rgba(40, 167, 69, 0.05);
}

#ai-reports .alert-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

#ai-reports .pattern-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#ai-reports .pattern-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

#ai-reports .pattern-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

#ai-reports .pattern-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

#ai-reports .pattern-value {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 4px;
}

#ai-reports .learning-progress {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#ai-reports .progress-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#ai-reports .progress-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#ai-reports .progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

#ai-reports .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
}

#ai-reports .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

#ai-reports .progress-value {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Responsive adjustments for AI Reports Analytics */
@media (max-width: 768px) {
    #ai-reports .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    #ai-reports .analytics-toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    #ai-reports .analytics-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    #ai-reports .metric {
        padding: 0.5rem;
    }
    
    #ai-reports .metric-value {
        font-size: 1.5rem;
    }
}

/* ===== CLICK ANALYTICS STYLES ===== */
#click-analytics .plan-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#click-analytics .plan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

#click-analytics .plan-item:hover {
    background: rgba(255, 71, 87, 0.1);
    border-color: var(--primary-color);
}

#click-analytics .plan-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

#click-analytics .plan-stats {
    display: flex;
    gap: 1.5rem;
}

#click-analytics .stat-item {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#click-analytics .stat-item span {
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 0.25rem;
}

#click-analytics .user-activity-table {
    width: 100%;
}

#click-analytics .table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    font-weight: 600;
}

#click-analytics .table-body {
    max-height: 300px;
    overflow-y: auto;
}

#click-analytics .table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr 1fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

#click-analytics .table-row:hover {
    background: var(--glass-bg);
}

#click-analytics .table-row:last-child {
    border-bottom: none;
}

#click-analytics .recent-activity {
    max-height: 400px;
    overflow-y: auto;
}

#click-analytics .activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

#click-analytics .activity-item:hover {
    background: var(--glass-bg);
}

#click-analytics .activity-item:last-child {
    border-bottom: none;
}

#click-analytics .activity-text {
    color: var(--text-primary);
    flex: 1;
}

#click-analytics .activity-time {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-left: 1rem;
}

/* Responsive styles for click analytics */
@media (max-width: 768px) {
    #click-analytics .plan-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    #click-analytics .plan-stats {
        gap: 1rem;
    }
    
    #click-analytics .table-header,
    #click-analytics .table-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    #click-analytics .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    #click-analytics .activity-time {
        margin-left: 0;
    }
}

/* ===== ENHANCED REPORT DETAILS MODAL STYLES ===== */
.enhanced-report-details {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
    direction: rtl;
    text-align: right;
}

.enhanced-report-details h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    font-size: 1.25rem;
}

.enhanced-report-details h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* Report Info Section */
.report-info-section {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-item span {
    color: var(--text-primary);
    font-size: 1rem;
}

.type-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--primary-color);
    color: white;
    display: inline-block;
    width: fit-content;
}

.marks-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    width: fit-content;
}

/* Report Content Section */
.report-content-section {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.content-item {
    margin-bottom: 1rem;
}

.content-item label {
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.content-text {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    line-height: 1.6;
}

.content-text.description {
    min-height: 80px;
    white-space: pre-wrap;
}

.attachment-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 8px;
    color: #007bff;
}

/* Solutions Section */
.solutions-section {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.solutions-container {
    margin-bottom: 1.5rem;
}

.solution-item {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.solution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(40, 167, 69, 0.2);
}

.solution-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.solution-steps ol {
    margin: 0.5rem 0;
    padding-right: 1.5rem;
}

.solution-steps li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.solution-notes {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-style: italic;
}

.no-solutions {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
}

/* Add Solution Form */
.add-solution-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.step-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.remove-step {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-step:hover {
    background: #c82333;
}

/* Comments Section */
.comments-section {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.comments-container {
    margin-bottom: 1.5rem;
}

.admin-comment {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 123, 255, 0.2);
}

.comment-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.comment-text {
    line-height: 1.6;
    color: var(--text-primary);
}

.no-comments {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
}

/* Add Comment Form */
.add-comment-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.add-comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    resize: vertical;
    font-family: inherit;
}

/* Quick Actions Section */
.quick-actions-section {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.actions-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    align-items: center;
}

.actions-grid select {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.actions-grid button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .enhanced-report-details {
        padding: 0.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .step-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .remove-step {
        align-self: flex-end;
        margin-top: 0.5rem;
    }
}

/* ===== NOTIFICATION SYSTEM STYLES ===== */

/* Notification Container for Toast Messages */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

/* Notification Icon in Header */
.notification-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.notification-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.notification-icon i {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    max-height: 500px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    direction: rtl;
    text-align: right;
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.mark-all-read {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mark-all-read:hover {
    background: var(--primary-color);
    color: white;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background: rgba(var(--primary-color-rgb), 0.1);
    border-left: 3px solid var(--primary-color);
}

.notification-item.read {
    opacity: 0.7;
}

.notification-content {
    margin-bottom: 0.75rem;
}

.notification-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.notification-message {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.notification-time {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.notification-actions button {
    padding: 0.25rem 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.mark-read:hover {
    background: var(--primary-dark);
}

.delete-notification {
    background: #dc3545;
    color: white;
}

.delete-notification:hover {
    background: #c82333;
}

.view-report {
    background: #28a745;
    color: white;
}

.view-report:hover {
    background: #218838;
}

.notification-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.view-all {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.view-all:hover {
    background: var(--primary-color);
    color: white;
}

.no-notifications {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem 1rem;
}

/* Simple Toast Notifications */
.toast-notification {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 250px;
    max-width: 350px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    direction: rtl;
    text-align: right;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.toast-message {
    color: #666;
    font-size: 13px;
    line-height: 1.3;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #666;
}

/* Simple Toast Types */
.toast-notification.toast-success {
    border-left: 3px solid #28a745;
    background: #f8fff9;
}

.toast-notification.toast-error {
    border-left: 3px solid #dc3545;
    background: #fff8f8;
}

.toast-notification.toast-info {
    border-left: 3px solid #17a2b8;
    background: #f8fcfd;
}

/* All Notifications Modal */
.notifications-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    direction: rtl;
    text-align: right;
}

.notifications-modal {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.notifications-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

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

.all-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Responsive Design for Notifications */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 300px;
        right: -50px;
    }
    
    .notification-container {
        right: 10px;
        top: 10px;
    }
    
    .toast-notification {
        min-width: 280px;
        max-width: 320px;
    }
    
    .notifications-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .notifications-filters {
        justify-content: center;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}

/* ===== ADMIN TOOLS STYLES ===== */

.admin-tools-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    direction: rtl;
    text-align: right;
}

.admin-tools-section h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.admin-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-section label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.admin-section select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    direction: rtl;
}

.admin-section select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.admin-section select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Internal Notes Styles */
.internal-notes {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.internal-note {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.internal-note:last-child {
    margin-bottom: 0;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.note-header strong {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.note-date {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.note-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
    white-space: pre-wrap;
}

.no-notes {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem;
    margin: 0;
}

.add-note-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.add-note-form textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: all 0.3s ease;
    direction: rtl;
    text-align: right;
}

.add-note-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.add-note-form textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.add-note-form button {
    align-self: flex-start;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-note-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.add-note-form button i {
    font-size: 0.8rem;
}

/* Priority and Category Indicators */
.priority-indicator {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-low {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.priority-medium {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.priority-high {
    background: rgba(255, 87, 34, 0.2);
    color: #ff5722;
    border: 1px solid rgba(255, 87, 34, 0.3);
}

.priority-urgent {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    animation: pulse 2s infinite;
}

.category-indicator {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    margin-left: 0.5rem;
}

/* Assignment Indicator */
.assignment-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    margin-top: 0.5rem;
}

.assignment-indicator i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.assignment-indicator span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Escalation Indicator */
.escalated-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.escalated-badge i {
    font-size: 0.7rem;
}

/* Responsive Design for Admin Tools */
@media (max-width: 768px) {
    .admin-tools-section {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    .admin-section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .admin-section select {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .add-note-form textarea {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .add-note-form button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .internal-notes {
        max-height: 150px;
    }
    
    .internal-note {
        padding: 0.6rem;
    }
    
    .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* ===== USER FEEDBACK SYSTEM STYLES ===== */

.user-feedback-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    direction: rtl;
    text-align: right;
}

.user-feedback-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.user-feedback-section h4 i {
    color: var(--primary-color);
    font-size: 1rem;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.rating-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-section label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.star-rating {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: center;
}

.star {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.star:hover,
.star.hover {
    color: #ffc107;
    transform: scale(1.1);
    text-shadow: 0 0 15px rgba(255, 193, 7, 0.5);
}

.star.selected {
    color: #ff9800;
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(255, 152, 0, 0.6);
}

.star.filled {
    color: #ff9800;
    text-shadow: 0 0 15px rgba(255, 152, 0, 0.4);
}

.star.empty {
    color: rgba(255, 255, 255, 0.2);
}

.feedback-text-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feedback-text-section label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.feedback-text-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    direction: rtl;
    text-align: right;
}

.feedback-text-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.feedback-text-section textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.submit-feedback-btn {
    align-self: flex-start;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.submit-feedback-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.4);
}

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

.submit-feedback-btn i {
    font-size: 0.85rem;
}

/* Feedback Submitted State */
.feedback-submitted {
    background: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.3);
}

.feedback-submitted h4 {
    color: #28a745;
    border-bottom-color: #28a745;
}

.feedback-submitted h4 i {
    color: #28a745;
}

.feedback-display {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-display span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.stars-display {
    display: flex;
    gap: 0.25rem;
}

.stars-display .star {
    font-size: 1.25rem;
    cursor: default;
}

.feedback-comment {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feedback-comment strong {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: block;
}

.feedback-comment p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feedback-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive Design for Feedback System */
@media (max-width: 768px) {
    .user-feedback-section {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    .star {
        font-size: 1.5rem;
    }
    
    .star-rating {
        gap: 0.25rem;
        justify-content: center;
    }
    
    .feedback-text-section textarea {
        min-height: 80px;
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .submit-feedback-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
        align-self: center;
    }
    
    .rating-display {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        text-align: center;
    }
    
    .stars-display .star {
        font-size: 1rem;
    }
}

/* تحسينات خاصة بقسم تصفية التقارير */
#filter-reports.active {
    animation: fadeInUp 0.5s ease;
}

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

/* تحسينات responsive لقسم التقارير */
@media (max-width: 768px) {
    .reports-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .filter-controls {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .filter-controls select {
        min-width: 120px;
        font-size: 0.85rem;
    }
    
    .action-controls {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .btn-secondary {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .admin-reports-table-container {
        max-height: 400px;
        margin-top: 0.5rem;
    }
    
    .admin-reports-table {
        min-width: 600px;
        font-size: 0.8rem;
    }
    
    .admin-reports-table th,
    .admin-reports-table td {
        padding: 0.5rem 0.75rem;
        max-width: 120px;
    }
    
    .reports-stats {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls select {
        width: 100%;
        min-width: auto;
    }
    
    .action-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .reports-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-reports-table-container {
        max-height: 350px;
    }
}
    
    .feedback-comment {
        padding: 0.6rem;
    }
    
    .feedback-comment p {
        font-size: 0.85rem;
        padding: 0.4rem;
    }
