/* ============================================================== */
/* STILURI PENTRU TOATE PAGINILE - PRINCIPALE */  
/* ============================================================== */

/* ============================================================== */
/* USER ROLE STYLES IN NAVBAR */
/* ============================================================== */

.user-info-nav {
    display: flex;
    align-items: center;
}

.user-profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.user-profile-link:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-info-nav i {
    color: #dc3545;
    font-size: 1.1em;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.user-info-nav span {
    font-size: 0.95em;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.2;
}

.user-role {
    font-size: 0.75em;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================== */
/* MULTI-USER MANAGEMENT STYLES */
/* ============================================================== */

/* User info display in tables */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.user-avatar.admin {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.user-meta {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 2px;
}

.user-meta i {
    margin-right: 4px;
    font-size: 0.8em;
}

/* Role badges */
.role-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.role-admin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.role-user {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #2d3748;
    box-shadow: 0 2px 4px rgba(168, 237, 234, 0.3);
}

/* Module count indicator */
.module-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(245, 87, 108, 0.3);
}

/* Action buttons in tables */
.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.action-buttons .btn {
    padding: 8px 12px;
    min-width: auto;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.action-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    border: 2px dashed #cbd5e0;
}

.empty-state i {
    font-size: 72px;
    margin-bottom: 24px;
    opacity: 0.4;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-state h3 {
    margin-bottom: 12px;
    color: var(--text-color);
    font-size: 1.5em;
    font-weight: 600;
}

.empty-state p {
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-size: 1.1em;
}

/* Form styling for user management */
.form-modern {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.85em;
}

.readonly {
    background-color: #f8fafc !important;
    cursor: not-allowed;
    color: var(--text-muted);
}

/* Sections in forms */
.section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f1f5f9;
}

.section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section h2 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.4em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h2 i {
    color: #667eea;
    font-size: 1.2em;
}

.info-text {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1em;
    line-height: 1.5;
}

/* Module selection - Simple list */
.modules-grid {
    margin-top: 20px;
}

.module-card {
    border-bottom: 1px solid #e9ecef;
    padding: 0;
    background: none;
}

.module-card:last-child {
    border-bottom: none;
}

.module-header .module-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    cursor: pointer;
    margin: 0;
    transition: background-color 0.2s ease;
}

.module-header .module-label:hover {
    background-color: #f8f9fa;
}

.module-header .module-label input[type="checkbox"] {
    margin: 0;
    transform: scale(1.1);
}

.module-header .module-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.module-header .module-icon {
    font-size: 1.4em;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.module-header .module-details {
    flex: 1;
}

.module-header .module-details h4 {
    margin: 0 0 2px 0;
    font-size: 0.95em;
    font-weight: 600;
    color: #2c3e50;
}

.module-header .module-details p {
    margin: 0;
    color: #6c757d;
    font-size: 0.8em;
    line-height: 1.3;
}







/* Checkbox styling */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    color: #667eea;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    transform: scale(1.1);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* User stats display */
.user-stats {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

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

.stat-label {
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.1em;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #f1f5f9;
    justify-content: center;
}

.form-actions .btn {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.form-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Permissions form specific styles */
.permissions-form {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}





/* Report permissions - Simple nested list */
.report-permissions {
    margin-left: 44px;
    padding: 8px 0 12px 0;
    border-left: 2px solid #e9ecef;
    padding-left: 16px;
}

.report-permissions small {
    color: #6c757d;
    font-size: 0.8em;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.report-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.report-option {
    display: flex;
    align-items: center;
}

.report-option .report-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    cursor: pointer;
    margin: 0;
    width: 100%;
    transition: color 0.2s ease;
}

.report-option .report-label:hover {
    color: #007bff;
}

.report-option input[type="checkbox"] {
    margin: 0;
}

.report-icon {
    font-size: 1em;
    width: 20px;
    text-align: center;
}

.report-details {
    flex: 1;
}

.report-details strong {
    color: #495057;
    font-size: 0.85em;
    font-weight: 500;
}

.report-details small {
    color: #6c757d;
    font-size: 0.75em;
    display: block;
    margin-top: 1px;
}

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

.module-icon-small {
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 8px;
    flex-shrink: 0;
}

/* Container styling for multi-user pages */
.company-users-page .main-content,
.add-user-page .main-content,
.edit-user-page .main-content,
.user-permissions-page .main-content {
    max-width: 1600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    padding: 2rem !important;
}

/* Responsive design for multi-user */
@media (max-width: 768px) {
    .module-header .module-label {
        padding: 10px 0;
        gap: 10px;
    }
    
    .module-header .module-icon {
        font-size: 1.2em;
        width: 28px;
    }
    
    .report-permissions {
        margin-left: 38px;
        padding-left: 12px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .user-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .action-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .empty-state {
        padding: 60px 16px;
    }
    
    .empty-state i {
        font-size: 48px;
    }
    
    .company-users-page .main-content,
    .add-user-page .main-content,
    .edit-user-page .main-content,
    .user-permissions-page .main-content {
        padding: 1rem !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
}

/* ============================================================== */
/* NAVBAR MODULE DISABLED STYLES */
/* ============================================================== */

.module-disabled {
    opacity: 0.6 !important;
    color: #9ca3af !important;
    cursor: default !important;
    position: relative !important;
    background: #f9fafb !important;
}

.module-disabled:hover {
    color: #9ca3af !important;
    background: #f3f4f6 !important;
    transform: none !important;
}

.module-disabled span {
    color: #9ca3af !important;
}

.module-disabled i:not(.module-lock-icon) {
    color: #9ca3af !important;
}

.module-lock-icon {
    color: #dc2626 !important;
    font-size: 0.8rem !important;
    margin-left: 0.5rem !important;
    opacity: 1 !important;
    animation: pulse 2s infinite;
}

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

/* Dropdown toggle when module disabled - still allow opening */
.dropdown-toggle.module-disabled {
    pointer-events: auto !important;
    opacity: 0.7 !important;
}

/* Dropdown menu items when disabled */
.dropdown-menu .module-disabled {
    background: #f9fafb !important;
    border-left: 3px solid #fca5a5 !important;
    pointer-events: auto !important; /* Allow clicks to redirect to upgrade */
    cursor: pointer !important;
}

.dropdown-menu .module-disabled:hover {
    background: #fef2f2 !important;
    border-left-color: #dc2626 !important;
}

/* Make sure active states don't override disabled styles */
.module-disabled.active {
    color: #9ca3af !important;
    background: #f9fafb !important;
}

/* Tooltip for disabled modules - doar pentru navbar */
.top-navbar .module-disabled[title] {
    position: relative;
}

.top-navbar .module-disabled[title]:hover::after {
    content: attr(title);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    background: #1f2937;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 99999;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    animation: tooltipFadeIn 0.3s ease-out;
    min-width: max-content;
    max-width: 300px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    line-height: 1.4;
}

.top-navbar .module-disabled[title]:hover::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #1f2937;
    z-index: 99999;
    pointer-events: none;
    animation: tooltipFadeIn 0.3s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Disable tooltips for dropdown items to prevent duplicates */
.dropdown-menu .module-disabled[title]:hover::after,
.dropdown-menu .module-disabled[title]:hover::before {
    display: none;
}

/* Navbar overflow adjustment pentru tooltip-uri */
.top-navbar {
    overflow: visible !important;
}

.dropdown-menu {
    overflow: visible !important;
}

/* Toate tooltip-urile folosesc acum position: fixed */

/* Ensure main content doesn't hide tooltips but stays below sidebars */
.main-content {
    position: relative;
    z-index: 1;
}

/* Specific z-index for rapoarte page main content to stay below sidebar */
.rapoarte-page .main-content {
    z-index: 1 !important;
}

/* Navbar should allow tooltips to show */
.navbar,
.top-navbar,
.dashboard-container {
    position: relative;
    z-index: 100;
}

/* ============================================================== */
/* UPGRADE PAGE STYLES - MODULE MANAGEMENT */
/* ============================================================== */

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

.module-upgrade-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    max-width: 100%;
}

.module-upgrade-card.module-active {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.module-upgrade-card.module-inactive {
    border-color: var(--border-color);
    opacity: 0.9;
}

.module-upgrade-card.module-requested {
    border-color: #dc2626;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
}

.module-upgrade-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.module-upgrade-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.module-upgrade-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.module-upgrade-title {
    flex: 1;
}

.module-upgrade-title h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.status-active {
    background: #d1fae5;
    color: var(--success-color);
}

.status-badge.status-inactive {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.status-requested {
    background: #fecaca;
    color: #dc2626;
}

.module-upgrade-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.module-upgrade-features {
    margin-bottom: 1.5rem;
}

.module-upgrade-features h4 {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.module-upgrade-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.module-upgrade-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.module-upgrade-features li:last-child {
    border-bottom: none;
}

.module-upgrade-features li i {
    color: var(--success-color);
    font-size: 0.875rem;
}

.activation-info {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    color: var(--success-color);
}

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

.module-upgrade-actions {
    text-align: center;
}

.success-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.75rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    margin-bottom: 1rem;
    color: var(--success-color);
    font-weight: 600;
    font-size: 0.875rem;
}

.contact-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.requested-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #dc2626;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.support-section {
    margin-top: 3rem;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.support-content {
    max-width: 500px;
    margin: 0 auto;
}

.support-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.support-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.support-section p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* Responsive pentru upgrade page */
@media (max-width: 1024px) {
    .modules-upgrade-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .modules-upgrade-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .module-upgrade-card {
        padding: 1.25rem;
    }
    
    .module-upgrade-header {
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .module-upgrade-icon {
        font-size: 2rem;
    }
    
    .module-upgrade-title h3 {
        font-size: 1.125rem;
    }
    
    .module-upgrade-description {
        font-size: 0.8rem;
    }
    
    .module-upgrade-features li {
        font-size: 0.75rem;
        padding: 0.375rem 0;
    }
    
    .support-section {
        margin-top: 2rem;
        padding: 1.5rem 1rem;
    }
    
    .support-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .support-section h3 {
        font-size: 1.125rem;
    }
    
    .support-section p {
        font-size: 0.8rem;
    }
}

/* Forțează aplicarea stilurilor - test de încărcare CSS */
body {
    background-color: #f8fafc !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.6 !important;
    color: #1e293b !important;
}

/* Fix specific pentru pagina canturi */
.canturi-page .main-content {
    margin-top: 55px !important;
    padding: 2rem !important;
}

/* Forțează stiluri pentru container-ul principal */
.dashboard-container {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

/* Variabile CSS pentru design modern */
:root {
    --primary-color: #b91c1c;
    --primary-dark: #991b1b;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --background-color: #f8fafc;
    --white: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --gradient-1: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    --gradient-2: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Container pentru dashboard */
.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Navigation Bar - Forțat */
.top-navbar {
    background: #ffffff !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 70px !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 2rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.navbar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
    color: #b91c1c !important;
    text-decoration: none !important;
}

.navbar-brand i {
    font-size: 2rem;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin-left: 3rem;
}

.navbar-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-menu a:hover {
    background: var(--background-color);
    color: var(--primary-color);
}

.navbar-menu a.active {
    background: var(--primary-color);
    color: var(--white);
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
    width: 80%;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.dropdown-toggle:hover {
    background: var(--background-color);
    color: var(--primary-color);
}

.dropdown-toggle.active {
    background: var(--primary-color);
    color: var(--white);
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

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

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 2000;
    overflow: hidden;
}

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

.dropdown-menu a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary) !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    background: transparent !important;
    border-radius: 0 !important;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--background-color) !important;
    color: var(--primary-color) !important;
    transform: translateX(5px);
}

.dropdown-menu a.active {
    background: var(--primary-color) !important;
    color: var(--white) !important;
}

.dropdown-menu a::after {
    display: none !important;
}

.dropdown-menu a i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

.navbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Stiluri pentru informațiile utilizatorului în navbar */
.company-info-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    transition: background-color 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.company-info-nav:hover {
    background: rgba(0, 0, 0, 0.1);
}

.company-info-nav i {
    color: var(--primary-color);
    font-size: 1.1em;
}

.company-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.company-info-nav span {
    font-size: 0.95em;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.2;
}

.welcome-text {
    font-size: 0.75em;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsivitate pentru user info */
@media (max-width: 768px) {
    .company-info-nav,
    .user-info-nav {
        font-size: 0.8rem;
        padding: 6px 8px;
        gap: 6px;
    }
    
    .company-details,
    .user-details {
        gap: 1px;
    }
    
    .company-info-nav span,
    .user-info-nav span {
        font-size: 0.85em;
    }
    
    .welcome-text,
    .user-role {
        font-size: 0.7em;
    }
    
    .company-info-nav i,
    .user-info-nav i {
        font-size: 1rem;
    }
}

.logout-btn {
    background: var(--background-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

/* Main Content - Forțat */
.main-content {
    margin-top: 55px !important;
    padding: 2rem !important;
    flex: 1 !important;
    max-width: 1600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: #f8fafc !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Alert */
.alert {
    background: var(--success-color);
    color: var(--white);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Form Container - Forțat */
.form-container {
    background: #ffffff !important;
    padding: 1.5rem !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 2rem !important;
    border: 2px solid #e2e8f0 !important;
}

.form-container h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.filter-input {
    padding: 8px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

.form-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Butoane moderne */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
}

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

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

.btn-secondary {
    background: var(--white);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--background-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-back {
    background: var(--secondary-color);
    color: var(--white);
    margin-bottom: 20px;
}

.btn-back:hover {
    background: #475569;
}

/* Filter Tags */
.filter-tags {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #e3f2fd;
    border-radius: 8px;
    font-size: 13px;
}

.filter-tag {
    display: inline-block;
    background: var(--white);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    margin: 2px;
    font-size: 12px;
}

/* Director Filter */
.director-filter {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border-left: 4px solid var(--success-color);
}

.director-filter h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.director-select {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    min-width: 300px;
    transition: all 0.3s ease;
}

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

/* Table Container */
.table-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow-x: auto; /* Permite scroll horizontal dacă e necesar */
    overflow-y: hidden;
    width: 100%;
    max-width: 100%; /* Asigură că nu depășește containerul părinte */
}

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

.table-title {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* Tabele moderne */
table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid var(--border-color);
}

/* Tabel raport - mai lat */
.tabel-raport {
    width: 100%;
    /* Elimină min-width pentru a se încadra perfect în container */
    border-collapse: collapse;
    border: 2px solid var(--border-color);
    table-layout: fixed; /* Forțează distribuția uniformă a coloanelor */
}

/* Buton pentru ascunderea rândurilor */
.btn-hide-row {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(185, 28, 28, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-hide-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-hide-row:hover::before {
    left: 100%;
}

.btn-hide-row:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(185, 28, 28, 0.4);
}

.btn-hide-row:active {
    transform: scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-hide-row i {
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Stiluri pentru checkbox-urile din tabele */
.row-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Checkbox master din header */
th input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Stiluri pentru butonul de ascundere în masă */
.btn.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    transition: all 0.3s ease;
}

.btn.btn-primary:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(185, 28, 28, 0.3);
}

th {
    background: var(--background-color);
    color: var(--text-primary);
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 1rem;
    border: 1px solid var(--border-color);
    vertical-align: top;
}



/* Page Header */
.page-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a {
    background: var(--white);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.pagination a:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination .current {
    background: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

/* Save Controls */
#save-controls {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

/* Stiluri pentru celulele editabile */
.editable-cell {
    cursor: pointer;
    position: relative;
}

.editable-cell:hover {
    background-color: #f8f9fa;
}

.edit-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 4px;
    font-size: inherit;
}

.edit-input.inline {
    background: #fff;
    border: 1px solid #007bff;
    border-radius: 3px;
}

.editing-row {
    background-color: #e3f2fd !important;
}

.edit-mode {
    background-color: #fff3cd !important;
}

.modified {
    background-color: #fff3cd !important;
    border: 2px solid #ffc107 !important;
}

.fill-handle {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    background: #007bff;
    border: 2px solid white;
    cursor: crosshair;
    display: none;
    z-index: 100;
}

.editable-cell:hover .fill-handle {
    display: block !important;
}

.fill-handle:hover {
    display: block !important;
    background: #0056b3 !important;
}

/* Stiluri pentru alte funcționalități */
.fill-preview {
    background-color: #e3f2fd !important;
    border: 1px dashed #2196f3 !important;
}

.fill-source {
    background-color: #bbdefb !important;
    border: 2px solid #2196f3 !important;
}

.drag-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    cursor: crosshair;
    background: transparent;
    display: none;
}

/* Stiluri pentru celulele read-only */
.readonly-cell {
    background-color: #f8f9fa !important;
    color: #6c757d;
    cursor: not-allowed;
}

.readonly-cell:hover {
    background-color: #e9ecef !important;
}

/* Responsive Design */
/* Tablete și laptopuri mici (1024px și mai jos) */
@media (max-width: 1024px) {
    .navbar-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .navbar-menu.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 55px;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-xl);
        padding: 1.5rem;
        gap: 1rem;
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        border-top: 1px solid var(--border-color);
    }
    
    .navbar-menu.active a {
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 1.1rem;
        border: 1px solid transparent;
    }
    
    .navbar-menu.active a:hover {
        background: var(--background-color);
        border-color: var(--border-color);
    }
    
    /* Dropdown styling pe tablete */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: var(--background-color);
        margin-left: 1rem;
        border-radius: 6px;
    }
    
    .dropdown.open .dropdown-menu {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    
    /* Stat cards pe tablete */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Form grids pe tablete */
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile phones (768px și mai jos) */
@media (max-width: 768px) {
    .top-navbar {
        padding: 0 1rem;
        height: 60px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand i {
        font-size: 1.5rem;
    }
    
    .mobile-menu-toggle {
        top: 12px;
        right: 12px;
        padding: 10px;
        font-size: 1rem;
    }
    
    .navbar-menu.active {
        top: 60px;
        padding: 1rem;
        max-height: calc(100vh - 60px);
    }
    
    .main-content {
        padding: 1rem;
        margin-top: 60px;
    }
    
    /* Stat cards pe mobile - în coloană */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.8rem;
        text-align: left;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-icon {
        margin-right: 10px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    /* Forms pe mobile */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .page-title {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        text-align: center;
    }
    
    .page-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .form-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .director-select {
        min-width: 100%;
    }
    
    /* Tables pe mobile */
    .clients-table {
        font-size: 0.85rem;
    }
    
    .clients-table th,
    .clients-table td {
        padding: 8px 6px;
    }
    
    /* Action buttons pe mobile */
    .action-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .btn-action span {
        display: none; /* Ascunde textul, păstrează doar iconițele pe mobile */
    }
    
    .btn-action {
        padding: 8px;
        min-width: 36px;
        height: 36px;
        border-radius: 6px;
    }
    
    /* Navbar actions pe mobile */
    .navbar-actions {
        gap: 0.5rem;
    }
    
    .company-info-nav,
    .user-info-nav {
        display: none; /* Ascunde pe mobile pentru a economisi spațiu */
    }
    
    .logout-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Telefoane foarte mici (480px și mai jos) */
@media (max-width: 480px) {
    .top-navbar {
        padding: 0 0.75rem;
        height: 55px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand i {
        font-size: 1.25rem;
    }
    
    .mobile-menu-toggle {
        top: 10px;
        right: 10px;
        padding: 8px;
        font-size: 0.9rem;
    }
    
    .navbar-menu.active {
        top: 55px;
        padding: 0.75rem;
        max-height: calc(100vh - 55px);
    }
    
    .main-content {
        padding: 0.75rem;
        margin-top: 55px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 0.6rem;
        text-align: left;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-icon {
        margin-right: 8px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Tables pe telefoane foarte mici */
    .clients-table {
        font-size: 0.75rem;
    }
    
    .clients-table th,
    .clients-table td {
        padding: 6px 4px;
    }
    
    /* Butoane pe telefoane foarte mici */
    .btn-action {
        padding: 6px;
        min-width: 32px;
        height: 32px;
    }
    
    .btn-action i {
        font-size: 0.85rem;
    }
    
    /* Form pe telefoane foarte mici */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* Stiluri specifice pentru pagina materiale */
.materiale-page th:nth-child(1), 
.materiale-page td:nth-child(1) { width: 15%; }

.materiale-page th:nth-child(2), 
.materiale-page td:nth-child(2) { width: 20%; }

.materiale-page th:nth-child(3), 
.materiale-page td:nth-child(3) { width: 15%; }

.materiale-page th:nth-child(4), 
.materiale-page td:nth-child(4) { width: 10%; }

.materiale-page th:nth-child(5), 
.materiale-page td:nth-child(5) { width: 10%; }

.materiale-page th:nth-child(6), 
.materiale-page td:nth-child(6) { width: 10%; }

.materiale-page th:nth-child(8), 
.materiale-page td:nth-child(8) { width: 10%; }

/* ========================================= */
/* STILURI PENTRU RAPOARTE - VERSIUNE NOUĂ ȘI CURATĂ */
/* ========================================= */

/* Container principal pentru rapoarte */
.rapoarte-page .table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important; /* Ascunde scroll-ul orizontal */
    overflow-y: visible !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

/* Encoding UTF-8 pentru simboluri speciale */
.rapoarte-page {
    font-feature-settings: normal !important;
    unicode-bidi: normal !important;
    text-rendering: optimizeLegibility !important;
}

/* Tabelele de raport - design simplu și eficient */
.rapoarte-page .tabel-raport {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    font-size: 15px; /* Mărit de la 14px la 15px */
    background: var(--white);
    box-sizing: border-box !important;
    overflow: hidden !important; /* Previne overflow-ul */
}

/* Header tabel */
.rapoarte-page .tabel-raport thead tr {
    background: var(--background-color);
}

.rapoarte-page .tabel-raport th {
    padding: 14px 10px !important; /* Mărit de la 12px 8px la 14px 10px */
    border: 1px solid var(--border-color);
    background: var(--background-color);
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    vertical-align: middle;
    font-size: 14px; /* Mărit de la 13px la 14px */
    line-height: 1.4; /* Mărit pentru mai mult spațiu */
}

/* Celule tabel */
.rapoarte-page .tabel-raport td {
    padding: 12px 10px !important; /* Mărit de la 10px 8px la 12px 10px */
    border: 1px solid var(--border-color);
    background: var(--white);
    vertical-align: middle;
    font-size: 14px; /* Mărit de la 13px la 14px */
    line-height: 1.5; /* Mărit pentru mai mult spațiu */
    box-sizing: border-box !important;
    overflow: hidden !important; /* Previne overflow-ul celulelor */
    text-overflow: ellipsis !important; /* Adaugă ... pentru text lung */
    max-width: 0 !important; /* Forțează respectarea width-ului */
}

/* Excepție pentru coloana descriere - permite text wrapping */
.rapoarte-page .tabel-raport td:nth-child(3) {
    text-overflow: clip !important; /* Permite text wrapping */
    overflow: visible !important; /* Permite overflow pentru descriere */
}

/* Hover effect pentru rânduri */
.rapoarte-page .tabel-raport tbody tr:hover {
    background: #f8f9fa !important;
}

/* Alternare culori pentru rânduri */
.rapoarte-page .tabel-raport tbody tr:nth-child(even) {
    background: #fafbfc;
}

.rapoarte-page .tabel-raport tbody tr:nth-child(even):hover {
    background: #f8f9fa !important;
}

/* ========================================= */
/* LĂȚIMI COLOANE PENTRU TABELELE DE RAPORT (8 coloane după eliminarea costurilor) - TOTAL: 100% */
/* ========================================= */

/* Coloana 1: Checkbox */
.rapoarte-page .tabel-raport th:nth-child(1),
.rapoarte-page .tabel-raport td:nth-child(1) {
    width: 5% !important;
    max-width: 5% !important;
    min-width: 45px !important;
    text-align: center !important;
}

/* Coloana 2: Nr. Crt */
.rapoarte-page .tabel-raport th:nth-child(2),
.rapoarte-page .tabel-raport td:nth-child(2) {
    width: 5% !important;
    max-width: 5% !important;
    min-width: 50px !important;
    text-align: center !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
}

/* Coloana 3: Descriere - cea mai largă coloană */
.rapoarte-page .tabel-raport th:nth-child(3),
.rapoarte-page .tabel-raport td:nth-child(3) {
    width: 45% !important;
    max-width: 45% !important;
    min-width: 250px !important;
    text-align: left !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    font-weight: normal !important; /* Forțează textul să nu fie bold */
}

/* Coloana 4: Cantitate */
.rapoarte-page .tabel-raport th:nth-child(4),
.rapoarte-page .tabel-raport td:nth-child(4) {
    width: 10% !important;
    max-width: 10% !important;
    min-width: 80px !important;
    text-align: right !important;
}

/* Coloana 5: U.M. */
.rapoarte-page .tabel-raport th:nth-child(5),
.rapoarte-page .tabel-raport td:nth-child(5) {
    width: 5% !important;
    max-width: 5% !important;
    min-width: 50px !important;
    text-align: center !important;
}

/* Coloana 6: Cod */
.rapoarte-page .tabel-raport th:nth-child(6),
.rapoarte-page .tabel-raport td:nth-child(6) {
    width: 10% !important;
    max-width: 10% !important;
    min-width: 90px !important;
    text-align: left !important;
}

/* Coloana 7: Producător */
.rapoarte-page .tabel-raport th:nth-child(7),
.rapoarte-page .tabel-raport td:nth-child(7) {
    width: 10% !important;
    max-width: 10% !important;
    min-width: 90px !important;
    text-align: left !important;
}

/* Stilurile pentru coloanele 8 și 9 (Cost Unitar și Cost Total) au fost eliminate 
   deoarece aceste coloane nu mai sunt prezente în tabelul "Bon de consum" */

/* Coloana 8: Acțiuni (fost coloana 10) */
.rapoarte-page .tabel-raport th:nth-child(8),
.rapoarte-page .tabel-raport td:nth-child(8) {
    width: 8% !important;
    max-width: 8% !important;
    min-width: 70px !important;
    text-align: center !important;
}

/* ========================================= */
/* HEADER-URI PENTRU TIPURILE DE COMPONENTE */
/* ========================================= */

/* Container pentru header-ul tipului de componentă */
.rapoarte-page .component-type-header {
    background: var(--background-color) !important;
    padding: 15px !important;
    margin: 20px 0 10px 0 !important;
    border-radius: 8px !important;
    border-left: 4px solid var(--primary-color) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    overflow: hidden !important;
}

.rapoarte-page .component-type-header .header-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    width: 100% !important;
}

.rapoarte-page .component-type-header h5 {
    margin: 0 !important;
    color: var(--text-primary) !important;
    font-size: 1.2rem !important; /* Mărit de la 1.1rem la 1.2rem */
    font-weight: 700 !important;
    flex: 1 !important;
    min-width: 200px !important;
}

.rapoarte-page .component-type-header .total-info {
    font-size: 14px !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    text-align: right !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* ========================================= */
/* RESPONSIVE DESIGN PENTRU RAPOARTE */
/* ========================================= */

/* Tablet și ecrane medii */
@media (max-width: 1024px) {
    .rapoarte-page .tabel-raport {
        font-size: 13px;
    }
    
    .rapoarte-page .tabel-raport th,
    .rapoarte-page .tabel-raport td {
        padding: 8px 6px !important;
    }
    
    .rapoarte-page .component-type-header {
        padding: 12px !important;
    }
    
    .rapoarte-page .component-type-header h5 {
        font-size: 1rem !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .rapoarte-page .table-container {
        border-radius: 8px;
        margin: 0 0 15px 0 !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .rapoarte-page .tabel-raport {
        font-size: 12px;
        min-width: 600px; /* Forțează scroll orizontal pe mobile */
    }
    
    .rapoarte-page .tabel-raport th,
    .rapoarte-page .tabel-raport td {
        padding: 6px 4px !important;
        white-space: nowrap;
    }
    
    /* Permite wrapping doar pentru coloana descriere */
    .rapoarte-page .tabel-raport th:nth-child(3),
    .rapoarte-page .tabel-raport td:nth-child(3) {
        white-space: normal;
        min-width: 200px;
    }
    
    .rapoarte-page .component-type-header .header-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    .rapoarte-page .component-type-header h5 {
        min-width: auto !important;
        font-size: 0.95rem !important;
    }
    
    .rapoarte-page .component-type-header .total-info {
        text-align: left !important;
        white-space: normal !important;
        font-size: 13px !important;
    }
    
    /* Component table container cu scroll */
    .rapoarte-page .component-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Mobile mic */
@media (max-width: 480px) {
    .rapoarte-page .table-container {
        margin: 0 0 10px 0 !important;
    }
    
    .rapoarte-page .tabel-raport {
        font-size: 11px;
        min-width: 500px; /* Redus pentru telefoane mici */
    }
    
    .rapoarte-page .tabel-raport th,
    .rapoarte-page .tabel-raport td {
        padding: 4px 3px !important;
    }
    
    /* Coloana descriere pe telefoane mici */
    .rapoarte-page .tabel-raport th:nth-child(3),
    .rapoarte-page .tabel-raport td:nth-child(3) {
        min-width: 150px;
        font-size: 10px;
    }
    
    .rapoarte-page .component-type-header {
        padding: 10px !important;
        margin: 15px 0 8px 0 !important;
    }
    
    .rapoarte-page .component-type-header h5 {
        font-size: 0.9rem !important;
    }
    
    .rapoarte-page .component-type-header .total-info {
        font-size: 12px !important;
    }
    
    /* Table actions pe telefoane mici */
    .rapoarte-page .table-actions {
        padding: 0.5rem !important;
    }
    
    .rapoarte-page .table-actions .btn {
        padding: 6px 4px;
        font-size: 0.7rem;
        min-width: calc(50% - 0.25rem);
    }
}

/* ========================================= */
/* STILURI PENTRU CLICK PE RÂNDURI ÎN RAPOARTE */
/* ========================================= */

/* Stiluri pentru rândurile clickabile din tabelele de rapoarte */
.table-row-raport, .table-row-feronerie {
    cursor: pointer !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect pentru rândurile clickabile */
.table-row-raport:hover, .table-row-feronerie:hover {
    background-color: rgba(0, 123, 255, 0.05) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Stiluri pentru rândurile selectate (când checkbox-ul este bifat) */
.table-row-raport:has(.row-checkbox:checked), 
.table-row-feronerie:has(.row-checkbox:checked),
.table-row-repere:has(.row-checkbox:checked) {
    background-color: rgba(0, 123, 255, 0.1) !important;
    border-left: 3px solid #007bff;
}

/* Fallback pentru browsere care nu suportă :has() */
.table-row-selected {
    background-color: rgba(0, 123, 255, 0.1) !important;
    border-left: 3px solid #007bff;
}

/* Asigură că hover-ul funcționează și pentru rândurile selectate */
.table-row-raport:has(.row-checkbox:checked):hover,
.table-row-feronerie:has(.row-checkbox:checked):hover,
.table-row-repere:has(.row-checkbox:checked):hover,
.table-row-selected:hover {
    background-color: rgba(0, 123, 255, 0.15) !important;
}

/* ========================================= */
/* STILURI PENTRU LISTA DE FERONERIE (8 coloane) */
/* ========================================= */

/* Pentru tabelele de feronerie care au doar 8 coloane */
.rapoarte-page .table-row-feronerie td:nth-child(3) {
    width: 30% !important;
    min-width: 250px !important;
}

.rapoarte-page .table-row-feronerie td:nth-child(6) {
    width: 140px !important;
}

.rapoarte-page .table-row-feronerie td:nth-child(7) {
    width: 160px !important;
}

.rapoarte-page .table-row-feronerie td:nth-child(8) {
    width: 80px !important;
}

/* ========================================= */
/* CURĂȚARE FINALĂ CSS */
/* ========================================= */

/* Asigură că nu există conflicte în layout */
.rapoarte-page .main-content-area {
    padding-right: 0 !important;
}

.rapoarte-page .table-actions {
    padding: 1rem 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* ========================================= */
/* FINALIZARE CSS RAPOARTE - VERSIUNE CURATĂ */
/* ========================================= */

/* Asigură că toate containerele sunt configurate corect */
.rapoarte-page .main-content-area .table-container {
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    overflow-x: auto !important;
}

.rapoarte-page div[style*="margin-bottom"] {
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
}





/* ========================================= */
/* COLORAREA TIPURILOR DE COMPONENTE */
/* ========================================= */

.rapoarte-page .tip-100 { background: #d4edda; }
.rapoarte-page .tip-101 { background: #d1ecf1; }
.rapoarte-page .tip-104 { background: #f8d7da; }
.rapoarte-page .tip-999 { background: #e2e3e5; }
.rapoarte-page .tip-168 { background: #f8d7da; }
.rapoarte-page .tip-188 { background: #fff3cd; }
.rapoarte-page .tip-12  { background: #e2e3e5; }

/* ========================================= */
/* STILURI PENTRU HEADER-URILE TIPURILOR DE COMPONENTE */
/* ========================================= */

/* Header-urile tipurilor de componente - responsive design */
.rapoarte-page .component-type-header {
    background: var(--background-color) !important;
    padding: 12px !important;
    margin: 15px 0 10px 0 !important;
    border-radius: 5px !important;
    border-left: 4px solid var(--primary-color) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    overflow: hidden !important;
}

.rapoarte-page .component-type-header .header-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.rapoarte-page .component-type-header h5 {
    margin: 0 !important;
    color: var(--text-primary) !important;
    flex-shrink: 1 !important;
    min-width: 150px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
}

.rapoarte-page .component-type-header .total-info {
    font-size: 15px !important; /* Mărit de la 14px la 15px */
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
    text-align: right !important;
    white-space: nowrap !important;
    max-width: calc(100% - 170px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Responsive pentru header-urile tipurilor pe ecrane mici */
@media (max-width: 768px) {
    .rapoarte-page .component-type-header .header-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }
    
    .rapoarte-page .component-type-header h5 {
        min-width: auto !important;
        width: 100% !important;
        font-size: 0.95rem !important;
    }
    
    .rapoarte-page .component-type-header .total-info {
        text-align: left !important;
        max-width: 100% !important;
        font-size: 13px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
}

@media (max-width: 480px) {
    .rapoarte-page .component-type-header {
        padding: 10px !important;
        margin: 10px 0 8px 0 !important;
    }
    
    .rapoarte-page .component-type-header h5 {
        font-size: 0.9rem !important;
    }
    
    .rapoarte-page .component-type-header .total-info {
        font-size: 12px !important;
    }
}

/* Settings page enhancements - conținut pe toată lățimea disponibilă */
.settings-page .main-content {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Suprascrie complet stilurile din proiecte.css pentru pagina de setări */
body.settings-page .main-content .settings-content {
    margin-left: 300px !important;
    width: calc(100% - 320px) !important;
    max-width: none !important;
    padding: 0 !important;
}

body.settings-page .dashboard-container .main-content .settings-content {
    margin-left: 300px !important;
    width: calc(100% - 320px) !important;
    max-width: none !important;
    padding: 0 !important;
}

/* Responsive pentru settings page - full width */
@media (max-width: 1024px) {
    body.settings-page .main-content .settings-content,
    body.settings-page .dashboard-container .main-content .settings-content {
        margin-left: 2rem !important;
        width: calc(100% - 3rem) !important;
    }
}

@media (max-width: 768px) {
    .settings-page .main-content {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    body.settings-page .main-content .settings-content,
    body.settings-page .dashboard-container .main-content .settings-content {
        margin-left: 1rem !important;
        margin-right: 1rem !important;
        width: calc(100% - 2rem) !important;
    }
}

@media (max-width: 480px) {
    .settings-page .main-content {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

.settings-page .form-container {
    border-left: 4px solid var(--primary-color) !important;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%) !important;
}

.settings-page .form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.settings-page .form-buttons {
    justify-content: flex-end;
}

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

/* Modern input fields for settings */
.settings-page .form-group input,
.settings-page .form-group select {
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: inset 0 0 0 0 rgba(0,0,0,0), var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.settings-page .form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.settings-page .form-group input:hover,
.settings-page .form-group select:hover {
    border-color: #cbd5e1;
}

.settings-page .form-group input:focus,
.settings-page .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.08);
    transform: translateY(-1px);
}

.settings-page .form-group input:invalid {
    border-color: #ef4444;
}

.settings-page .form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
}

/* Stiluri specifice pentru pagina feronerie */
.feronerie-page th:nth-child(1), 
.feronerie-page td:nth-child(1) { /* Nume */
    min-width: 120px;
    max-width: 150px;
}

.feronerie-page th:nth-child(2), 
.feronerie-page td:nth-child(2) { /* Descriere Scurtă */
    min-width: 150px;
    max-width: 200px;
}

.feronerie-page th:nth-child(3), 
.feronerie-page td:nth-child(3) { /* ID Articol */
    min-width: 120px;
    max-width: 150px;
}

.feronerie-page th:nth-child(4), 
.feronerie-page td:nth-child(4) { /* ID Comandă */
    min-width: 100px;
    max-width: 130px;
}

.feronerie-page th:nth-child(5), 
.feronerie-page td:nth-child(5) { /* Preț */
    text-align: right;
    min-width: 80px;
    max-width: 100px;
}

.feronerie-page th:nth-child(6), 
.feronerie-page td:nth-child(6) { /* Adaos */
    min-width: 80px;
    max-width: 100px;
}

.feronerie-page th:nth-child(7), 
.feronerie-page td:nth-child(7) { /* Furnizor */
    min-width: 120px;
    max-width: 150px;
}

/* Stiluri specifice pentru pagina canturi */
.canturi-page th:nth-child(1), 
.canturi-page td:nth-child(1) { /* Nume */
    min-width: 120px;
    max-width: 150px;
}

.canturi-page th:nth-child(2), 
.canturi-page td:nth-child(2) { /* Descriere */
    min-width: 200px;
    max-width: 250px;
}

.canturi-page th:nth-child(3), 
.canturi-page td:nth-child(3) { /* Cod */
    min-width: 120px;
    max-width: 150px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.canturi-page th:nth-child(4), 
.canturi-page td:nth-child(4) { /* Preț */
    text-align: right;
    min-width: 80px;
    max-width: 100px;
}

.canturi-page th:nth-child(5), 
.canturi-page td:nth-child(5) { /* Factor */
    min-width: 80px;
    max-width: 100px;
}

.canturi-page th:nth-child(6), 
.canturi-page td:nth-child(6) { /* Grosime */
    min-width: 80px;
    max-width: 100px;
}

.canturi-page th:nth-child(7), 
.canturi-page td:nth-child(7) { /* Grosime THK */
    min-width: 100px;
    max-width: 120px;
}

.canturi-page th:nth-child(8), 
.canturi-page td:nth-child(8) { /* Înălțime */
    min-width: 80px;
    max-width: 100px;
}

.canturi-page th:nth-child(9), 
.canturi-page td:nth-child(9) { /* Comandă */
    min-width: 100px;
    max-width: 120px;
}

.canturi-page th:nth-child(10), 
.canturi-page td:nth-child(10) { /* Producător */
    min-width: 120px;
    max-width: 150px;
}

/* Stiluri specifice pentru pagina profile */
.profile-page th:nth-child(1), 
.profile-page td:nth-child(1) { /* Nume */
    min-width: 140px;
    max-width: 170px;
}

.profile-page th:nth-child(2), 
.profile-page td:nth-child(2) { /* Cod */
    min-width: 120px;
    max-width: 150px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.profile-page th:nth-child(3), 
.profile-page td:nth-child(3) { /* Preț */
    text-align: right;
    min-width: 80px;
    max-width: 100px;
}

.profile-page th:nth-child(4), 
.profile-page td:nth-child(4) { /* Factor */
    min-width: 80px;
    max-width: 100px;
}

.profile-page th:nth-child(5), 
.profile-page td:nth-child(5) { /* Producător */
    min-width: 120px;
    max-width: 150px;
}

/* Îmbunătățiri pentru formularele de filtrare */
.form-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.form-container h3 {
    color: var(--primary-color) !important;
    font-weight: 700;
    font-size: 1.3rem;
}

.filter-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1) !important;
    transform: translateY(-1px);
}

/* Stiluri îmbunătățite pentru butoane */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    box-shadow: 0 2px 4px rgba(185, 28, 28, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 8px rgba(185, 28, 28, 0.4) !important;
}

.btn-secondary:hover {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 2px 4px rgba(185, 28, 28, 0.2);
}

/* Director filter îmbunătățiri */
.director-filter {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%) !important;
    border-left: 4px solid var(--primary-color) !important;
}

.director-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1) !important;
}

/* Animații pentru hover pe table rows */
tr {
    transition: all 0.2s ease !important;
}



/* Îmbunătățiri pentru paginare */
.pagination a:hover {
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 4px 8px rgba(185, 28, 28, 0.3) !important;
}

/* Loading states pentru butoane */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Alert îmbunătățit */
.alert {
    border-left: 4px solid var(--success-color) !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2) !important;
}

/* ============================================================== */
/* STILURI SPECIFICE PENTRU INDEX.PHP - DASHBOARD */
/* ============================================================== */

/* Stats Grid pentru dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    text-align: left;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 3px;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
}

.stat-content {
    flex: 1;
}

/* Quick Actions pentru dashboard */
.quick-actions {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.action-card {
    background: var(--background-color);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

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

.action-card:hover .action-icon {
    background: var(--white);
    color: var(--primary-color);
}

.action-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.action-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.action-description {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Connection Status pentru dashboard */
.connection-status {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.status-dot.error {
    background: #ef4444;
}

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

.server-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    background: var(--background-color);
    border-radius: 12px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
}

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

/* Animații pentru dashboard */
@keyframes pulse {
    0%, 100% { 
        opacity: 1;
    }
    50% { 
        opacity: 0.5;
    }
}

/* ============================================================== */
/* PROJECT STATISTICS SECTION - REDESIGNED */
/* ============================================================== */

.projects-section {
    margin: 2rem 0;
    padding: 0;
    background: transparent;
}

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

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 400;
}

/* Modern Statistics Grid */
.projects-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Modern Stat Cards */
.stat-card-modern {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 1.2rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

.stat-card-modern.current-year::before {
    background: linear-gradient(90deg, var(--primary-color), #dc2626);
}

.stat-card-modern.previous-year::before {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

.stat-card-modern.users-card::before {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.stat-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Card Header */
.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.stat-icon-modern {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.current-year .stat-icon-modern {
    background: linear-gradient(135deg, var(--primary-color), #dc2626);
}

.previous-year .stat-icon-modern {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.users-card .stat-icon-modern {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.stat-badge {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(185, 28, 28, 0.1);
    color: var(--primary-color);
}

.current-year .stat-badge {
    background: rgba(185, 28, 28, 0.1);
    color: var(--primary-color);
}

.previous-year .stat-badge {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.users-card .stat-badge {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Card Content */
.stat-content-modern {
    text-align: center;
    margin: 1.5rem 0;
}

.stat-number-large {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-label-modern {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-summary {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.04);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
}

/* Card Footer */
.stat-footer-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.trend-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.04);
}

.trend-up {
    color: #059669;
}

.trend-down {
    color: #dc2626;
}

.trend-neutral {
    color: #6b7280;
}

/* Users List Styling */
.users-list-modern {
    max-height: 180px;
    overflow-y: auto;
    margin-top: 1rem;
    padding-right: 0.5rem;
}

.user-item-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.user-item-modern:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(2px);
}

.user-item-modern:last-child {
    margin-bottom: 0;
}

.user-info-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.user-avatar.top-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.user-avatar.top-2 {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
}

.user-avatar.top-3 {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
}

.user-name-modern {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.user-projects-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(185, 28, 28, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

/* Scrollbar pentru lista de utilizatori */
.users-list-modern::-webkit-scrollbar {
    width: 4px;
}

.users-list-modern::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.users-list-modern::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.users-list-modern::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .projects-stats-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card-modern {
        padding: 1rem;
    }
    
    .stat-number-large {
        font-size: 2rem;
    }
    
    .stat-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .user-item-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .user-projects-count {
        align-self: flex-end;
    }
}



/* ============================================================== */
/* STILURI PENTRU ORDER MANAGER - PAGINA RAPOARTE */
/* ============================================================== */

/* Layout principal pentru pagina rapoarte */
.rapoarte-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 140px);
    width: calc(100vw - 50px); /* Reduc lățimea pentru spațiu în dreapta */
    position: relative;
    padding-left: 320px; /* Face loc pentru sidebar-ul fix */
}

/* Suprascrie restricțiile pentru pagina rapoarte */
.rapoarte-page .main-content {
    max-width: none !important;
    width: calc(100vw - 50px) !important; /* Reduc lățimea pentru spațiu în dreapta */
    padding: 2rem 0 2rem 2rem !important; /* Elimină padding-ul din dreapta */
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important; /* Previne overflow-ul orizontal la nivelul paginii */
}

/* Containerul de tabele pentru pagina rapoarte */
.rapoarte-page .table-container {
    width: 100% !important; /* Folosește întreaga lățime disponibilă */
    max-width: 100% !important; 
    overflow-x: auto !important; /* Permite scroll horizontal dacă e necesar */
    margin-right: 0 !important; /* Nu mai trebuie margin suplimentar */
    padding-right: 0 !important;
    padding-left: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Forțează aplicarea pentru toate containerele de tabele din rapoarte */
.rapoarte-page .main-content-area .table-container {
    margin-right: 0 !important;
    width: 100% !important;
}

/* Stiluri pentru spațiul din dreapta - aplicat prin HTML inline */

/* Order Manager Sidebar - Partea Stângă */
.order-manager-sidebar {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: 0; /* Elimină border-radius pentru aspect fix */
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-left: none; /* Elimină border-ul din stânga */
    height: calc(100vh - 70px); /* Înălțimea completă minus navbar */
    position: fixed; /* Poziție fixă */
    top: 55px; /* Începe din navbar */
    left: 0; /* Lipit de marginea din stânga */
    z-index: 1000; /* Măresc z-index pentru a fi sigur că rămâne deasupra */
    overflow-y: auto; /* Scroll intern dacă e necesar */
    display: flex; /* Asigură că sidebar-ul este vizibil */
    flex-direction: column;
}

/* Forțează vizibilitatea sidebar-ului pe desktop */
@media (min-width: 1201px) {
    .order-manager-sidebar {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 1000 !important;
    }
    
    /* Asigură că conținutul principal nu se suprapune */
    .rapoarte-page .main-content,
    .rapoarte-page .main-content-area {
        z-index: 1 !important;
        position: relative !important;
    }
}

.order-manager-container {
    padding: 1.5rem;
}

.order-manager-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.order-manager-title i {
    color: var(--accent-color);
}

/* Alert compact pentru order manager */
.alert-compact {
    background: var(--success-color);
    color: var(--white);
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-left: 4px solid #059669;
}

/* Lista comenzilor disponibile */
.orders-list {
    margin-bottom: 1.5rem;
}

/* Header pentru lista de comenzi */
.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* Contorul de proiecte disponibile */
.orders-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Container pentru căutare */
.search-container {
    margin-bottom: 1rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 35px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    background: var(--white);
    transition: all 0.3s ease;
    outline: none;
}

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

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    z-index: 1;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

.clear-search-btn i {
    font-size: 0.75rem;
}

/* Informații despre rezultatele căutării */
.search-results-info {
    margin-top: 0.5rem;
    text-align: center;
}

.search-has-results {
    font-size: 0.8rem;
    color: var(--success-color);
    font-weight: 500;
}

.search-no-results {
    font-size: 0.8rem;
    color: #ef4444;
    font-weight: 500;
}

/* Container pentru comenzi */
.orders-container {
    max-height: 350px; /* Înălțime fixă mai mică pentru a nu depăși spațiul disponibil */
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-color);
}

/* Stiluri pentru scrollbar */
.orders-container::-webkit-scrollbar {
    width: 6px;
}

.orders-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.orders-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.orders-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Item individual pentru comandă */
.order-item {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    z-index: 10;
    pointer-events: auto;
}

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

.order-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.order-item.selected {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.2);
}

.order-item.selected:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
}

/* Conținutul comenzii */
.order-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Checkbox custom pentru comandă */
.order-checkbox {
    position: relative;
    flex-shrink: 0;
}

.order-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.order-checkbox-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--white);
    transition: all 0.3s ease;
    position: relative;
}

.order-checkbox-custom i {
    font-size: 10px;
    color: var(--white);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Stări checkbox */
.order-item:hover .order-checkbox-custom {
    border-color: var(--primary-color);
    background: rgba(185, 28, 28, 0.1);
}

.order-item.selected .order-checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.order-item.selected .order-checkbox-custom i {
    opacity: 1;
}

/* Informații despre comandă */
.order-info {
    flex: 1;
    min-width: 0;
}

.order-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.order-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* Tooltip simplu și funcțional */
.order-name[title] {
    cursor: help;
}

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



/* Stiluri pentru când nu sunt comenzi */
.no-orders {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
}

.no-orders i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.no-orders p {
    margin: 0;
    font-style: italic;
}



/* Conținutul principal - Partea Dreaptă */
.main-content-area {
    flex: 1;
    min-width: 0;
    width: calc(100vw - 380px); /* 320px sidebar + 60px spațiu în dreapta */
    position: relative;
    z-index: 1; /* Asigură că rămâne sub sidebar */
    max-width: calc(100vw - 380px);
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Previne overflow-ul orizontal */
    padding: 0; /* Elimină padding-ul complet pentru control maxim */
    margin-left: 0.5rem; /* Folosește margin în loc de padding */
    margin-right: 50px; /* Spațiu mai mare în dreapta */
    box-sizing: border-box; /* Include padding-ul în calculul lățimii */
}

/* Action Navbar - Container pentru acțiuni */
.action-navbar {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.action-navbar-content {
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.action-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.action-info i {
    color: var(--primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.action-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.action-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-buttons {
    flex-shrink: 0;
}

.btn-action {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 200px;
    justify-content: center;
}

.btn-action:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #7f1d1d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
}

.btn-action:disabled,
.btn-action.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--text-secondary) !important;
    transform: none !important;
    box-shadow: none !important;
}

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

/* Formular compact în Order Manager */
.order-manager .form-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.form-section-title {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title i {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* Descrierea secțiunii din form */
.form-section-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    font-style: italic;
}



.btn-full {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
}

.btn-full:disabled,
.btn-full.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--text-secondary) !important;
    border-color: var(--text-secondary) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Afișarea comenzilor selectate */
.selected-orders-display {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1;
    position: relative;
}

.selected-orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #0c4a6e;
}

.selected-orders-header i {
    color: #0ea5e9;
    font-size: 0.9rem;
}

.clear-selection-btn {
    background: none;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.clear-selection-btn:hover {
    background: #ef4444;
    color: white;
}

.clear-selection-btn i {
    font-size: 0.7rem;
}

.selected-orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 120px;
    overflow-y: auto;
}

/* Scrollbar pentru lista de proiecte selectate */
.selected-orders-list::-webkit-scrollbar {
    width: 4px;
}

.selected-orders-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
}

.selected-orders-list::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.5);
    border-radius: 2px;
}

.selected-orders-list::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 165, 233, 0.7);
}

.selected-order-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    font-size: 0.8rem;
    color: #0c4a6e;
}

.selected-order-item i {
    color: #0ea5e9;
    font-size: 0.75rem;
}

.selected-order-item span {
    flex: 1;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.remove-order-btn {
    background: none;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-order-btn:hover {
    background: #ef4444;
    color: white;
}

.remove-order-btn i {
    font-size: 0.6rem;
}

/* Mesaj când nu există comenzi disponibile */
.no-orders-message {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-style: italic;
}

.no-orders-message i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    display: block;
    opacity: 0.6;
}

.no-orders-message p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Mesaj când nu sunt proiecte selectate */
.no-selection-message {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-style: italic;
}

.no-selection-message i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
    display: block;
    opacity: 0.7;
}

.no-selection-message p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Mesaj când nu există raport generat */
.no-report-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.no-report-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.no-report-content i {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-report-content h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.no-report-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design pentru Order Manager */
/* Tablete și laptopuri mici (1200px și mai jos) */
@media (max-width: 1200px) {
    .rapoarte-layout {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }
    
    .order-manager-sidebar {
        width: 100%;
        min-width: auto;
        max-width: 100%;
        position: static;
        order: 1;
    }
    
    .main-content-area {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        order: 2;
    }
    
    .orders-container {
        max-height: 300px;
    }
    
    .order-item {
        padding: 0.75rem;
    }
    
    /* Action navbar pe tablete */
    .action-navbar-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .btn-action {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }
}

/* Mobile phones (768px și mai jos) */
@media (max-width: 768px) {
    .rapoarte-layout {
        gap: 1rem;
        padding: 0;
    }
    
    .order-manager-container {
        padding: 1rem;
    }
    
    .order-manager-title {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .order-item {
        padding: 0.75rem;
    }
    
    .order-name {
        font-size: 0.9rem;
    }
    
    /* Action navbar pe mobile */
    .action-navbar {
        margin: 0.5rem 0;
    }
    
    .action-navbar-content {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0;
    }
    
    .btn-action {
        width: 100%;
        padding: 14px 16px;
        font-size: 0.9rem;
        justify-content: center;
    }
    
    /* Custom dropdown pe mobile */
    .custom-dropdown {
        width: 100% !important;
    }
    
    .custom-dropdown-menu {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    /* Table actions pe mobile */
    .table-actions {
        padding: 0.75rem !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .table-actions .btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        padding: 10px 8px;
        font-size: 0.8rem;
        text-align: center;
    }
    
    /* Search container pe mobile */
    .search-container {
        margin-bottom: 1rem;
    }
    
    .search-input-wrapper {
        position: relative;
    }
    
    .search-input {
        width: 100%;
        padding: 12px 40px 12px 40px;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    /* Orders list pe mobile */
    .orders-container {
        max-height: 250px;
        overflow-y: auto;
    }
    
    .order-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .order-checkbox {
        align-self: flex-end;
    }
    
    /* Sidebar collapsible pe mobile */
    .order-manager-sidebar {
        position: relative;
    }
    
    .order-manager-sidebar.collapsed {
        max-height: 60px;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .order-manager-sidebar.expanded {
        max-height: none;
        transition: max-height 0.3s ease;
    }
    
    .sidebar-toggle-mobile {
        display: block;
        width: 100%;
        padding: 10px;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 6px;
        margin-bottom: 10px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    /* Ascunde butonul pe desktop */
    @media (min-width: 769px) {
        .sidebar-toggle-mobile {
            display: none !important;
        }
    }
    
    .sidebar-toggle-mobile:hover {
        background: var(--primary-dark);
    }
    
    .sidebar-toggle-mobile i {
        margin-left: 8px;
        transition: transform 0.3s ease;
    }
    
    .sidebar-toggle-mobile.expanded i {
        transform: rotate(180deg);
    }
    
    /* Selected orders pe mobile */
    .selected-orders-display {
        margin-top: 1rem;
    }
    
    .selected-orders-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .clear-selection-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Telefoane foarte mici (480px și mai jos) */
@media (max-width: 480px) {
    .rapoarte-layout {
        gap: 0.75rem;
    }
    
    .order-manager-container {
        padding: 0.75rem;
    }
    
    .order-manager-title {
        font-size: 1rem;
    }
    
    .order-item {
        padding: 0.5rem;
    }
    
    .order-name {
        font-size: 0.85rem;
    }
    
    /* Action buttons pe telefoane mici */
    .action-navbar-content {
        padding: 0.75rem;
    }
    
    .btn-action {
        padding: 12px 14px;
        font-size: 0.85rem;
    }
    
    /* Table actions pe telefoane mici */
    .table-actions .btn {
        padding: 8px 6px;
        font-size: 0.75rem;
        min-width: calc(50% - 0.25rem);
    }
    
    /* Search input pe telefoane mici */
    .search-input {
        padding: 10px 35px 10px 35px;
        font-size: 0.9rem;
    }
    
    /* Orders container pe telefoane mici */
    .orders-container {
        max-height: 200px;
    }
    
    /* Table responsive pe telefoane mici */
    .rapoarte-page .tabel-raport {
        font-size: 10px;
    }
    
    .rapoarte-page .tabel-raport th,
    .rapoarte-page .tabel-raport td {
        padding: 3px 2px !important;
    }
    
    .rapoarte-page .component-type-header {
        padding: 8px !important;
        margin: 10px 0 6px 0 !important;
    }
    
    .rapoarte-page .component-type-header h5 {
        font-size: 0.85rem !important;
    }
    
    .rapoarte-page .component-type-header .total-info {
        font-size: 11px !important;
    }
    
    .order-checkbox-custom {
        width: 18px;
        height: 18px;
    }
    
    .order-checkbox-custom i {
        font-size: 10px;
    }
    
    .form-section-title {
        font-size: 0.9rem;
    }
    
    .selected-orders-display {
        padding: 0.6rem;
        max-height: 150px;
    }
    
    .selected-orders-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    .clear-selection-btn {
        font-size: 0.7rem;
        padding: 3px 6px;
        align-self: flex-end;
    }
    
    .selected-orders-list {
        max-height: 80px;
    }
    
    .selected-order-item {
        padding: 0.4rem;
        font-size: 0.75rem;
    }
    
    .selected-order-item span {
        font-size: 0.7rem;
    }
    
    .action-navbar-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .action-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    
    .action-subtitle {
        margin-left: 0;
        text-align: center;
    }
    
    .btn-action {
        min-width: 100%;
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
    
    .no-selection-message {
        padding: 1rem;
    }
    
    .no-selection-message i {
        font-size: 1.5rem;
    }
    
    .no-selection-message p {
        font-size: 0.8rem;
    }
    
    .no-report-content {
        padding: 1.5rem;
    }
    
    .no-report-content i {
        font-size: 3rem;
    }
    
    .no-report-content h3 {
        font-size: 1.3rem;
    }
    
    .no-report-content p {
        font-size: 0.9rem;
    }
    
    .search-input {
        font-size: 0.8rem;
        padding: 6px 10px 6px 30px;
    }
    
    .search-icon {
        left: 10px;
        font-size: 0.75rem;
    }
    
    .clear-search-btn {
        right: 6px;
        padding: 3px;
    }
    
    .search-has-results,
    .search-no-results {
        font-size: 0.75rem;
    }
}

/* ============================================================== */
/* STILURI PENTRU MATERIALS MANAGER - PAGINA MATERIALE */
/* ============================================================== */

/* Layout principal pentru pagina materiale */
.materiale-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 140px);
    width: 100%;
    position: relative;
    padding-left: 320px; /* Face loc pentru sidebar-ul fix */
}

/* Suprascrie restricțiile pentru pagina materiale */
.materiale-page .main-content {
    max-width: none !important;
    width: 100% !important;
    padding: 2rem 0 2rem 2rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
}

/* Containerul de tabele pentru pagina materiale */
.materiale-page .table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

/* Materials Manager Sidebar - Partea Stângă */
.materials-manager-sidebar {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-left: none;
    height: calc(100vh - 70px);
    position: fixed;
    top: 55px;
    left: 0;
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.materials-manager-container {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Secțiuni din sidebar */
.sidebar-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    flex: 1;
}

.sidebar-title {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--border-color);
}

.sidebar-title i {
    color: var(--accent-color);
}

/* Stiluri pentru file manager cu expand/collapse */
.file-manager-section {
    flex: 1;
}

.file-manager-container {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
}

.file-manager-folder {
    border-bottom: 1px solid var(--border-light);
}

.file-manager-folder:last-child {
    border-bottom: none;
}

.file-manager-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    position: relative;
}

.file-manager-item:hover {
    background-color: var(--hover-bg);
}

.file-manager-item.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.file-manager-item.active .folder-icon,
.file-manager-item.active .expand-btn {
    color: var(--white);
}

/* Buton expand/collapse */
.expand-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    transition: all 0.2s ease;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

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

.expand-btn.expanded {
    color: var(--primary-color);
}

.expand-spacer {
    width: 16px;
    height: 16px;
}

/* Iconiță folder */
.folder-icon {
    color: var(--accent-color);
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
}

/* Zona clickabilă pentru folder */
.folder-clickable {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.folder-clickable:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Numele directorului */
.folder-name {
    flex: 1;
}

/* Buton de selecție */
.select-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    margin-left: 4px;
}

.file-manager-item:hover .select-btn {
    opacity: 1;
}

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

.file-manager-item.active .select-btn {
    opacity: 1;
    background-color: var(--white);
    color: var(--primary-color);
}

/* Container pentru copii - aliniare uniformă la stânga */
.folder-children {
    border-left: 2px solid var(--border-light);
    margin-left: 12px; /* Mică indentare pentru a arăta că sunt copii */
    position: relative;
}

/* Eliminăm indentarea progresivă - toate folderele aliniate uniform */
.file-manager-item.level-1,
.file-manager-item.level-2,
.file-manager-item.level-3,
.file-manager-item.level-4 {
    padding-left: 8px; /* Aliniare uniformă la stânga pentru toate nivelurile */
}

/* Linia de conectare subtilă pentru ierarhie vizuală */
.folder-children {
    border-left-color: rgba(59, 130, 246, 0.2);
}

/* Animații pentru expand/collapse */
.folder-children {
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Stiluri pentru directorul "Toate directoarele" */
.file-manager-item[data-dir-id=""] {
    font-weight: 600;
    background-color: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
}

.file-manager-item[data-dir-id=""]:hover {
    background-color: var(--hover-bg);
}

.file-manager-item[data-dir-id=""].active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Stiluri pentru secțiunea de filtrare avansată din zona principală */
.advanced-filter-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
    border-radius: 8px 8px 0 0;
}

.filter-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-title i {
    color: var(--accent-color);
}

.filter-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

.filter-content {
    padding: 1.25rem;
}

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

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

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

.filter-input {
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.filter-input:hover {
    border-color: var(--primary-color);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-tags {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

.filter-tag {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin: 2px;
}

/* Stiluri pentru butonul live filter activ */
.live-filter-active {
    background: var(--success-color) !important;
    color: var(--white) !important;
}

/* Mesaj informativ pentru afișarea recursivă */
.info-message {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.info-message i {
    color: #1976d2;
    font-size: 1rem;
}

/* Formulare din sidebar */
.sidebar-form-group {
    margin-bottom: 0.75rem;
}

.sidebar-form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

.sidebar-filter-input {
    width: 100%;
    padding: 0.55rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.sidebar-filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.1);
}

/* Butoane din sidebar */
.sidebar-form-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 1rem;
}

.btn-small {
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Filtre active din sidebar */
.sidebar-filter-tags {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-filter-tags strong {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.sidebar-filter-tag {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Conținutul principal pentru materiale */
.materiale-page .main-content-area {
    flex: 1;
    min-width: 0;
    width: calc(100vw - 370px);
    max-width: calc(100vw - 370px);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding: 0;
    margin-left: 0.5rem;
}

/* Stiluri pentru titlul integrat în tabel */
.table-title-row {
    background: linear-gradient(135deg, var(--primary-color), #d32f2f);
    color: var(--white);
    cursor: default;
}

.table-title-row:hover {
    background: linear-gradient(135deg, var(--primary-color), #d32f2f) !important;
}

.table-title-header {
    padding: 1rem 1.5rem !important;
    border: none !important;
    background: transparent !important;
    cursor: default !important;
    pointer-events: none;
}

.table-title-header:hover {
    background: transparent !important;
    color: var(--white) !important;
}

.table-title-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.table-title-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-title-left i {
    font-size: 1.2rem;
    color: var(--white);
}

.table-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
}

.results-badge {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.table-title-right {
    display: flex;
    align-items: center;
}

.page-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-info i {
    font-size: 0.85rem;
}

/* Stiluri pentru rândul cu coloanele */
.table-columns-row th {
    background: var(--background-color) !important;
    color: var(--text-primary) !important;
    border-bottom: 2px solid var(--primary-color) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1rem !important;
}

/* Stiluri pentru paginarea de jos */
.pagination-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--background-color);
    border-radius: 0 0 8px 8px;
    padding: 1rem 1.5rem;
}

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

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-pagination {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.pagination-current {
    margin: 0 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.pagination-current strong {
    color: var(--primary-color);
}

/* Responsive Design pentru Materials Manager */
@media (max-width: 1200px) {
    .materiale-layout {
        flex-direction: column;
        gap: 1.5rem;
        padding-left: 0;
    }
    
    .materials-manager-sidebar {
        width: 100%;
        min-width: auto;
        position: static;
        height: auto;
        margin-bottom: 1rem;
    }
    
    .materiale-page .main-content {
        padding: 2rem !important;
        width: 100% !important;
    }
    
    .materiale-page .main-content-area {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
    }
    
    .sidebar-form-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .btn-small {
        flex: 1;
        min-width: calc(50% - 0.25rem);
    }
}

@media (max-width: 768px) {
    .materials-manager-container {
        padding: 0.75rem;
    }
    
    .sidebar-title {
        font-size: 0.95rem;
    }
    
    .sidebar-form-buttons {
        flex-direction: column;
    }
    
    .btn-small {
        width: 100%;
        min-width: auto;
    }
    
    .file-manager-item {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .expand-btn {
        width: 14px;
        height: 14px;
        font-size: 0.6rem;
    }
    
    .folder-children {
        margin-left: 8px; /* Indentare mai mică pe mobile */
    }
    
    .file-manager-item.level-1,
    .file-manager-item.level-2,
    .file-manager-item.level-3,
    .file-manager-item.level-4 {
        padding-left: 6px; /* Aliniare uniformă pe mobile */
    }
    
    .select-btn {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }
    
    .folder-clickable {
        gap: 4px;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-buttons .btn {
        width: 100%;
    }
    
    .sidebar-filter-input {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .pagination-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn-pagination {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Responsive pentru titlul tabelului */
    .table-title-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .table-title-left {
        justify-content: center;
        gap: 8px;
    }
    
    .table-name {
        font-size: 1.1rem;
    }
    
    .results-badge {
        font-size: 0.8rem;
        padding: 0.25rem 0.6rem;
    }
    
    .page-info {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .table-columns-row th {
        font-size: 0.8rem;
        padding: 0.6rem 0.5rem !important;
    }
}

/* ============================================================== */
/* STILURI PENTRU HARDWARE MANAGER - PAGINA FERONERIE */
/* ============================================================== */

/* Layout principal pentru pagina feronerie */
.feronerie-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 140px);
    width: calc(100vw - 50px);
    position: relative;
    padding-left: 320px; /* Face loc pentru sidebar-ul fix */
}

/* Suprascrie restricțiile pentru pagina feronerie */
.feronerie-page .main-content {
    max-width: none !important;
    width: calc(100vw - 50px) !important;
    padding: 2rem 0 2rem 2rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
}

/* Containerul de tabele pentru pagina feronerie */
.feronerie-page .table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

/* Hardware Manager Sidebar - Partea Stângă */
.hardware-manager-sidebar {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-left: none;
    height: calc(100vh - 70px);
    position: fixed;
    top: 55px;
    left: 0;
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.hardware-manager-container {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Conținutul principal pentru feronerie */
.feronerie-page .main-content-area {
    flex: 1;
    min-width: 0;
    width: calc(100vw - 380px);
    max-width: calc(100vw - 380px);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding: 0;
    margin-left: 0.5rem;
}

/* Responsive Design pentru Hardware Manager */
@media (max-width: 1200px) {
    .feronerie-layout {
        flex-direction: column;
        gap: 1.5rem;
        padding-left: 0;
    }
    
    .hardware-manager-sidebar {
        width: 100%;
        min-width: auto;
        position: static;
        height: auto;
        margin-bottom: 1rem;
    }
    
    .feronerie-page .main-content {
        padding: 2rem !important;
        width: 100% !important;
    }
    
    .feronerie-page .main-content-area {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .hardware-manager-container {
        padding: 0.75rem;
    }
}

/* ============================================================== */
/* STILURI PENTRU PRESET COLUMNS */
/* ============================================================== */

.preset-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.column-tag {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.column-tag.more {
    background: var(--gray-200);
    color: var(--gray-600);
}

.columns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.columns-section {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid var(--gray-200);
}

.columns-section h4 {
    color: var(--gray-800);
    margin-bottom: 1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.column-group {
    margin-bottom: 1rem;
}

.group-title {
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.column-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
}

.column-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: background-color 0.2s ease;
}

.column-option:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
}

.column-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.column-option label {
    font-size: 0.875rem;
    cursor: pointer;
    flex: 1;
}

.selected-columns {
    background: white;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 1rem;
    min-height: 200px;
    transition: all 0.3s ease;
}

.selected-columns.has-items {
    border-color: var(--primary-color);
    border-style: solid;
}

.selected-column-item {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    transition: transform 0.2s ease;
}

.selected-column-item:hover {
    transform: translateX(4px);
}

.selected-column-item strong {
    display: block;
    font-size: 0.875rem;
}

.selected-column-item small {
    display: block;
    opacity: 0.8;
    font-size: 0.75rem;
}

.column-controls {
    display: flex;
    gap: 0.25rem;
}

.column-control-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: background-color 0.2s ease;
}

.column-control-btn:hover {
    background: rgba(255,255,255,0.3);
}

.empty-state {
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
    padding: 2rem;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
    display: block;
}

@media (max-width: 768px) {
    .columns-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .column-options {
        grid-template-columns: 1fr;
    }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.show {
    display: flex !important;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    padding: 2rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h3 i {
    color: var(--primary-color);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all 0.15s ease;
}

.btn-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
}

.modal-footer {
    background: var(--gray-50);
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.15s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

@media (max-width: 768px) {
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.5rem;
    }
}

/* Settings Layout with Sidebar */
.settings-layout {
    display: block;
    position: relative;
    min-height: calc(100vh - 80px);
}

/* Override main-content restrictions for settings pages */
.company-users-page .main-content {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

.settings-sidebar {
    background: white;
    box-shadow: var(--shadow-lg);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* Space for navbar */
}

.sidebar-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #dc2626 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.sidebar-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sidebar-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.875rem;
    line-height: 1.4;
}

.sidebar-nav {
    padding: 1.5rem 0;
}

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

.nav-section:last-child {
    margin-bottom: 0;
}

.nav-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin: 0 0 1rem 0;
    padding: 0 1.5rem;
}

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

.nav-item {
    margin: 0;
}

.nav-item.disabled .nav-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-link:hover {
    background: var(--gray-50);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-item.active .nav-link {
    background: linear-gradient(90deg, rgba(185, 28, 28, 0.1) 0%, rgba(185, 28, 28, 0.05) 100%);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.nav-link i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
}

.nav-link span {
    flex: 1;
}

.nav-badge {
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

.nav-item.active .nav-badge {
    background: var(--primary-color);
    color: white;
}

.nav-badge.coming-soon {
    background: var(--warning-color);
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
}

.settings-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    margin-left: 300px !important;
    margin-top: 1rem;
    margin-right: 1rem;
    margin-bottom: 1rem;
    min-height: calc(100vh - 100px);
    max-height: calc(100vh - 100px);
    width: calc(100% - 320px) !important;
    max-width: none !important;
}

.content-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.content-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Responsive pentru sidebar */
@media (max-width: 1024px) {
    .settings-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .settings-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .settings-content {
        margin-left: 2rem;
        margin-right: 1rem;
        width: calc(100% - 3rem);
        max-width: none !important;
    }
    
    /* Buton pentru deschiderea sidebar-ului pe mobile */
    .mobile-sidebar-toggle {
        display: block;
        position: fixed;
        top: 90px;
        left: 1rem;
        z-index: 101;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        cursor: pointer;
        box-shadow: var(--shadow-lg);
    }
}

@media (min-width: 1025px) {
    .mobile-sidebar-toggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .settings-content {
        margin-left: 1rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
        margin-right: 1rem;
        max-height: calc(100vh - 100px);
        width: calc(100% - 2rem);
        max-width: none !important;
    }
    
    .sidebar-header {
        padding: 1.5rem;
    }
    
    .content-header {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .content-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .content-body {
        padding: 1.5rem;
        gap: 1.5rem;
    }
}

/* ============================================================== */
/* DROPDOWN CUSTOM PENTRU LISTA CU REPERE - COMPLET REFĂCUT */
/* ============================================================== */

/* Container principal dropdown */
.custom-dropdown {
    position: relative !important;
    display: inline-block !important;
    vertical-align: top !important;
}

/* Meniul dropdown - stiluri foarte puternice */
.custom-dropdown-menu {
    /* Poziționare absolută */
    position: absolute !important;
    top: calc(100% + 2px) !important;
    left: 0 !important;
    right: auto !important;
    
    /* Dimensiuni și afișare */
    display: none !important;
    min-width: 280px !important;
    max-width: 400px !important;
    width: auto !important;
    max-height: 350px !important;
    
    /* Stilizare vizuală */
    background: #ffffff !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    
    /* Z-index foarte mare */
    z-index: 999999 !important;
    
    /* Overflow pentru scroll */
    overflow: visible !important;
    overflow-y: auto !important;
    
    /* Animație */
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    transition: all 0.2s ease !important;
    
    /* Resetează orice margin/padding */
    margin: 0 !important;
    padding: 8px 0 !important;
}

/* Dropdown vizibil */
.custom-dropdown-menu[style*="block"],
.custom-dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Opțiunile din dropdown */
.preset-option {
    /* Resetează toate stilurile */
    all: unset !important;
    
    /* Stiluri custom */
    display: block !important;
    width: 100% !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    
    /* Text și culori */
    color: #333333 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    
    /* Cursor fără tranziție */
    cursor: pointer !important;
    transition: none !important;
    
    /* Border între opțiuni */
    border-bottom: 1px solid #f1f3f4 !important;
    
    /* Box model */
    box-sizing: border-box !important;
}

/* Fără hover pe opțiuni */
.preset-option:hover,
.preset-option:focus {
    background-color: transparent !important;
    color: #333333 !important;
    transform: none !important;
}

/* Ultima opțiune fără border */
.preset-option:last-child {
    border-bottom: none !important;
}

/* Iconițele din opțiuni */
.preset-option i {
    display: inline-block !important;
    margin-right: 10px !important;
    width: 18px !important;
    text-align: center !important;
    font-size: 14px !important;
}

/* Separatorul HR */
.custom-dropdown-menu hr {
    margin: 8px 0 !important;
    border: none !important;
    border-top: 1px solid #e9ecef !important;
}

/* Link-ul pentru setări */
.custom-dropdown-menu a[href*="setari"] {
    color: #6c757d !important;
    font-style: italic !important;
}

.custom-dropdown-menu a[href*="setari"]:hover {
    color: #6c757d !important;
    background-color: transparent !important;
}

/* Forțează afișarea peste orice element */
body .custom-dropdown-menu,
html .custom-dropdown-menu,
* .custom-dropdown-menu {
    z-index: 999999 !important;
    position: absolute !important;
}

/* Resetează orice overflow care ar putea ascunde dropdown-ul */
.action-navbar,
.action-navbar-content,
.action-buttons {
    overflow: visible !important;
}

/* Media queries pentru responsive */
@media (max-width: 768px) {
    .custom-dropdown-menu {
        min-width: 250px !important;
        max-width: calc(100vw - 40px) !important;
        left: auto !important;
        right: 0 !important;
    }
}

/* ============================================================== */
/* STILURI PENTRU EDGES MANAGER - PAGINA CANTURI */
/* ============================================================== */

/* Layout principal pentru pagina canturi */
.canturi-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 140px);
    width: calc(100vw - 50px);
    position: relative;
    padding-left: 320px; /* Face loc pentru sidebar-ul fix */
}

/* Suprascrie restricțiile pentru pagina canturi */
.canturi-page .main-content {
    max-width: none !important;
    width: calc(100vw - 50px) !important;
    padding: 2rem 0 2rem 2rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
}

/* Containerul de tabele pentru pagina canturi */
.canturi-page .table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

/* Edges Manager Sidebar - Partea Stângă */
.edges-manager-sidebar {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-left: none;
    height: calc(100vh - 70px);
    position: fixed;
    top: 55px;
    left: 0;
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.edges-manager-container {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Conținutul principal pentru canturi */
.canturi-page .main-content-area {
    flex: 1;
    min-width: 0;
    width: calc(100vw - 380px);
    max-width: calc(100vw - 380px);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding: 0;
    margin-left: 0.5rem;
}

/* Responsive Design pentru Edges Manager */
@media (max-width: 1200px) {
    .canturi-layout {
        flex-direction: column;
        gap: 1.5rem;
        padding-left: 0;
    }
    
    .edges-manager-sidebar {
        width: 100%;
        min-width: auto;
        position: static;
        height: auto;
        margin-bottom: 1rem;
    }
    
    .canturi-page .main-content {
        padding: 2rem !important;
        width: 100% !important;
    }
    
    .canturi-page .main-content-area {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .edges-manager-container {
        padding: 0.75rem;
    }
}

/* ============================================================== */
/* STILURI PENTRU PROFILES MANAGER - PAGINA PROFILE */
/* ============================================================== */

/* Layout principal pentru pagina profile */
.profile-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 140px);
    width: calc(100vw - 50px);
    position: relative;
    padding-left: 320px; /* Face loc pentru sidebar-ul fix */
}

/* Suprascrie restricțiile pentru pagina profile */
.profile-page .main-content {
    max-width: none !important;
    width: calc(100vw - 50px) !important;
    padding: 2rem 0 2rem 2rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
}

/* Containerul de tabele pentru pagina profile */
.profile-page .table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

/* Profiles Manager Sidebar - Partea Stângă */
.profiles-manager-sidebar {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-left: none;
    height: calc(100vh - 70px);
    position: fixed;
    top: 55px;
    left: 0;
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.profiles-manager-container {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Conținutul principal pentru profile */
.profile-page .main-content-area {
    flex: 1;
    min-width: 0;
    width: calc(100vw - 380px);
    max-width: calc(100vw - 380px);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding: 0;
    margin-left: 0.5rem;
}

/* Responsive Design pentru Profiles Manager */
@media (max-width: 1200px) {
    .profile-layout {
        flex-direction: column;
        gap: 1.5rem;
        padding-left: 0;
    }
    
    .profiles-manager-sidebar {
        width: 100%;
        min-width: auto;
        position: static;
        height: auto;
        margin-bottom: 1rem;
    }
    
    .profile-page .main-content {
        padding: 2rem !important;
        width: 100% !important;
    }
    
    .profile-page .main-content-area {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .profiles-manager-container {
        padding: 0.75rem;
    }
}

/* ============================================================== */
/* STILURI COMPACTE PENTRU NAVBAR - CONSISTENT PE TOATE PAGINILE */
/* ============================================================== */

/* Navbar mai compact */
.top-navbar {
    height: 60px !important;
    padding: 0 1.5rem !important;
}

/* Brand mai compact */
.navbar-brand {
    gap: 10px !important;
    font-size: 1.4rem !important;
}

.navbar-brand i {
    font-size: 1.8rem !important;
}

/* Meniu principal mai compact */
.navbar-menu {
    gap: 1.5rem !important;
    margin-left: 2.5rem !important;
}

.navbar-menu a {
    padding: 7px 14px !important;
    font-size: 0.95rem !important;
}

/* Dropdown mai compact */
.dropdown-toggle {
    padding: 7px 14px !important;
    gap: 7px !important;
    font-size: 0.95rem !important;
}

.dropdown-arrow {
    font-size: 0.75rem !important;
}

/* Dropdown menu mai compact */
.dropdown-menu {
    min-width: 190px !important;
    border-radius: 7px !important;
}

.dropdown-menu a {
    gap: 10px !important;
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
}

.dropdown-menu a i {
    font-size: 0.9rem !important;
    width: 15px !important;
}

/* Navbar actions mai compacte */
.navbar-actions {
    gap: 0.9rem !important;
}

/* Company info mai compact */
.company-info-nav {
    gap: 7px !important;
    padding: 7px 11px !important;
    font-size: 0.9rem !important;
}

.company-info-nav i {
    font-size: 0.95rem !important;
}

.company-details span {
    font-size: 0.9rem !important;
}

.welcome-text {
    font-size: 0.8rem !important;
}

/* User info mai compact */
.user-info-nav a {
    padding: 7px 11px !important;
}

.user-details span {
    font-size: 0.9rem !important;
}

.user-role {
    font-size: 0.8rem !important;
}

/* Logout button mai compact */
.logout-btn {
    padding: 7px 12px !important;
    font-size: 0.9rem !important;
}

/* Module lock icons mai mici */
.module-lock-icon {
    font-size: 0.75rem !important;
}

/* Chat notification badge mai mic */
.chat-notification-badge {
    width: 18px !important;
    height: 18px !important;
    font-size: 0.7rem !important;
}

/* Ajustează main content pentru navbar mai mic */
.main-content {
    margin-top: 60px !important;
}

.dashboard-container {
    padding-top: 60px !important;
}

/* Responsive breakpoints pentru navbar compact */
@media (max-width: 1024px) {
    .top-navbar {
        height: 55px !important;
        padding: 0 1rem !important;
    }
    
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    .navbar-brand i {
        font-size: 1.5rem !important;
    }
    
    .mobile-menu-toggle {
        top: 10px !important;
        width: 36px !important;
        height: 36px !important;
    }
    
    .navbar-menu.active {
        top: 55px !important;
        padding: 0.9rem !important;
        max-height: calc(100vh - 55px) !important;
    }
    
    .main-content {
        margin-top: 55px !important;
    }
    
    .dashboard-container {
        padding-top: 55px !important;
    }
}

@media (max-width: 768px) {
    .top-navbar {
        height: 50px !important;
        padding: 0 0.8rem !important;
    }
    
    .navbar-brand {
        font-size: 1rem !important;
    }
    
    .navbar-brand i {
        font-size: 1.3rem !important;
    }
    
    .mobile-menu-toggle {
        top: 8px !important;
        width: 34px !important;
        height: 34px !important;
        font-size: 0.95rem !important;
    }
    
    .navbar-menu.active {
        top: 50px !important;
        padding: 0.7rem !important;
        max-height: calc(100vh - 50px) !important;
    }
    
    .navbar-menu.active a {
        padding: 10px 14px !important;
        font-size: 1rem !important;
    }
    
    .main-content {
        margin-top: 50px !important;
    }
    
    .dashboard-container {
        padding-top: 50px !important;
    }
}

