/* =====================================================
   WorkForce - Main Stylesheet
   Extracted from index.html for modular architecture
   ===================================================== */

/* ===================================================== 
   1. Reset and Base Styles
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* ===================================================== 
   2. Layout Components
   ===================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* ===================================================== 
   3. User Interface
   ===================================================== */
.user-info,
.login-info {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-details {
    text-align: right;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    opacity: 0.8;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: none;
}

.login-btn {
    background: #2196f3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-btn:hover {
    background: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ===================================================== 
   4. Navigation
   ===================================================== */
/* Bootstrap navbar fixes for clickability */
.navbar {
    position: relative;
    z-index: 9999 !important; /* Ensure navbar is always on top */
}

.navbar-nav {
    position: relative;
    z-index: 9999 !important;
}

.navbar-nav .nav-link {
    cursor: pointer !important;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 0.5rem 1rem !important;
    display: block !important;
    position: relative !important;
    z-index: 9999 !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Special style for planning link */
.navbar-nav .nav-link.text-warning {
    color: #ffc107 !important;
    font-weight: 600;
}

.navbar-nav .nav-link.text-warning:hover {
    color: #ffecb3 !important;
    background-color: rgba(255, 193, 7, 0.2);
}

/* Fix for any overlapping elements */
.container-fluid.mt-3 {
    position: relative;
    z-index: 1;
}

/* Ensure no modal overlays block navigation */
.modal-backdrop {
    z-index: 1040 !important;
}

.modal {
    z-index: 1050 !important;
}

/* Remove any pointer-events issues */
.navbar * {
    pointer-events: auto !important;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.nav-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.nav-btn.active {
    background: #764ba2;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn.planning-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    font-weight: 600;
    position: relative;
    animation: pulse 2s infinite;
}

.nav-btn.planning-btn:hover {
    background: linear-gradient(135deg, #ee5a24 0%, #ff6b6b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 90, 36, 0.3);
}

@keyframes pulse {
    0% { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 4px 8px rgba(238, 90, 36, 0.4); }
    100% { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
}

/* ===================================================== 
   5. Sections
   ===================================================== */
.section {
    display: none;
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

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

/* ===================================================== 
   6. Typography
   ===================================================== */
h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

/* ===================================================== 
   7. Forms
   ===================================================== */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

/* ===================================================== 
   8. Buttons
   ===================================================== */
button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

button:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

button.delete {
    background: #e74c3c;
}

button.delete:hover {
    background: #c0392b;
}

button.edit {
    background: #f39c12;
}

button.edit:hover {
    background: #e67e22;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* ===================================================== 
   9. Cards
   ===================================================== */
.card {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

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

/* Modern employee card styles */
.employee-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    overflow: hidden;
}

.employee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.employee-card .card-header {
    border-bottom: none;
}

.employee-card .card-body {
    padding: 1.25rem;
}

.employee-card .info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.employee-card h6 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.employee-card .employee-schedule,
.employee-card .employee-skills,
.employee-card .employee-machines {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

.employee-card .btn-group .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0;
}

.employee-card .btn-group .btn:first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.employee-card .btn-group .btn:last-child {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

/* Employee skills preview */
.skills-preview-container {
    margin-top: 8px;
}

.skills-preview .badge {
    font-size: 0.75rem;
    font-weight: normal;
}

/* Employee machines preview */
.machines-preview-container {
    margin-top: 8px;
}

/* Employee statistics cards */
.employees-stats .stat-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}

.employees-stats .stat-card h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #0d6efd;
    margin-bottom: 0.5rem;
}

.employees-stats .stat-card p {
    margin: 0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================================================== 
   10. Skills and Machines Grid
   ===================================================== */
.skill-grid, .machine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.skill-item, .machine-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    border: 2px solid #e1e5e9;
    transition: all 0.3s ease;
    min-height: 48px;
}

.skill-item:hover, .machine-item:hover {
    border-color: #667eea;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
}

.checkbox-container label {
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
    word-wrap: break-word;
    line-height: 1.3;
}

.checkbox-container input[type="checkbox"] {
    transform: scale(1.2);
    margin: 0;
}

/* ===================================================== 
   11. Priority Styles
   ===================================================== */
.priority-heart {
    color: #ddd;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.priority-heart:hover {
    transform: scale(1.2);
    color: #e74c3c;
}

.priority-heart.active {
    color: #e74c3c;
    animation: heartbeat 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(231, 76, 60, 0.4));
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.priority-item {
    background: linear-gradient(135deg, #fff0f0 0%, #ffe8e8 100%);
    border: 2px solid #ffb3b3;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.15);
}

/* ===================================================== 
   12. Availability Management Styles
   ===================================================== */
.availability-item {
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.availability-item:hover {
    background-color: #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.availability-calendar-container {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.availability-list {
    max-height: 400px;
    overflow-y: auto;
}

/* ===================================================== 
   13. Machine Management Styles
   ===================================================== */
.machine-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.machine-item:hover {
    background-color: #e9ecef;
    transform: translateX(3px);
}

.machine-level-1 { border-color: #6c757d; }
.machine-level-2 { border-color: #28a745; }
.machine-level-3 { border-color: #ffc107; }
.machine-level-4 { border-color: #fd7e14; }
.machine-level-5 { border-color: #dc3545; }

.machines-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.priority-item:hover {
    border-color: #ff9999;
    transform: translateX(3px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.2);
}

.priority-hint {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f8ff 100%);
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.priority-hint p {
    margin: 0 !important;
    color: #0c5460 !important;
    font-weight: 500;
}

/* ===================================================== 
   12. Status Badges
   ===================================================== */
.task-status {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-waiting {
    background: #fff3cd;
    color: #856404;
}

.status-progress {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.priority-low {
    background: #d4edda;
    color: #155724;
}

.priority-medium {
    background: #fff3cd;
    color: #856404;
}

.priority-high {
    background: #f8d7da;
    color: #721c24;
}

/* ===================================================== 
   13. Alerts
   ===================================================== */
.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* ===================================================== 
   14. Loading States
   ===================================================== */
.loading {
    text-align: center;
    padding: 2rem;
    color: #667eea;
    font-size: 1.1rem;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* ===================================================== 
   15. Modal Styles
   ===================================================== */
.modal {
    display: block;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

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

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.modal-header .close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    margin: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.modal-header .close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===================================================== 
   16. MoyСклад Integration Styles
   ===================================================== */
.status-card {
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #ddd;
}

.status-card.connected {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.status-card.disconnected {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.status-card.warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #007bff;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.sync-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 15px 0;
}

.sync-btn {
    padding: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 1em;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sync-btn.import {
    background: #28a745;
    color: white;
}

.sync-btn.import:hover {
    background: #218838;
}

.sync-btn.export {
    background: #007bff;
    color: white;
}

.sync-btn.export:hover {
    background: #0056b3;
}

.sync-btn.disabled {
    background: #6c757d !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.sync-btn.disabled:hover {
    background: #6c757d !important;
}

/* ===================================================== 
   17. Product Groups Tree
   ===================================================== */
.product-groups-panel {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: #fafbfc;
    padding: 15px;
    margin: 15px 0;
    max-height: 400px;
    overflow-y: auto;
}

.group-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    position: relative;
}

.group-item:hover {
    background-color: #f0f8ff;
}

.group-item.selected {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

.group-expand-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #757575;
    cursor: pointer;
    user-select: none;
}

.group-expand-icon.expanded::before {
    content: '▼';
}

.group-expand-icon.collapsed::before {
    content: '▶';
}

.group-folder-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    color: #ff9800;
    font-size: 14px;
}

.group-folder-icon::before {
    content: '📁';
}

.group-name {
    flex: 1;
    user-select: none;
    color: #1976d2;
}

.group-product-count {
    font-size: 12px;
    color: #757575;
    margin-left: 8px;
    background: #e3f2fd;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ===================================================== 
   18. Skills Management UI
   ===================================================== */
.skills-management {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid #e9ecef;
}

.priority-info-box {
    background: linear-gradient(135deg, #fff3e0 0%, #f3e5f5 100%);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #ff9800;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.priority-icon {
    font-size: 2rem;
    color: #ff9800;
}

.current-priority {
    background: #fff3e0;
    color: #e65100;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.no-priority {
    color: #666;
    font-style: italic;
}

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

.skills-column {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.skills-column h6 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f8f9fa;
}

.skills-list {
    max-height: 300px;
    overflow-y: auto;
}

.skill-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

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

.priority-skill {
    background: linear-gradient(135deg, #fff3e0 0%, #ffecb3 100%);
    border-left: 4px solid #ff9800;
}

.available-skill {
    background: #e8f5e8;
    border-left: 4px solid #28a745;
}

.skill-actions button {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

/* ===================================================== 
   19. Machine Cards and Skill Requirements Styles
   ===================================================== */
/* Machine card styles */
.machine-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    overflow: hidden;
}

.machine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.machine-card .card-header {
    border-bottom: none;
}

.machine-card .card-body {
    padding: 1.25rem;
}

.machine-card .info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.machine-card .info-row i {
    margin-top: 0.25rem;
    width: 20px;
    text-align: center;
}

.machine-card h6 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.machine-card .machine-performance,
.machine-card .machine-schedule,
.machine-card .machine-operators,
.machine-card .machine-maintenance-info {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

.machine-card .btn-group .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0;
}

.machine-card .btn-group .btn:first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.machine-card .btn-group .btn:last-child {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.machine-card .btn-group .btn i {
    font-size: 1rem;
}

/* Skill requirements styles */
.skill-requirements-container {
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.skill-requirements-preview {
    font-size: 0.9em;
}

.skill-requirements-preview .badge {
    font-size: 0.85em;
    margin-right: 4px;
}

.skill-requirement-item {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
}

.skill-requirements-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ===================================================== 
   20. Production & Planning Modules
   ===================================================== */
.production-dashboard,
.planning-dashboard {
    padding: 1rem 0;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.2s;
}

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

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #007bff;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.products-grid {
    margin-top: 1rem;
}

.product-category-section {
    margin-bottom: 2rem;
}

.category-title {
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.product-card {
    height: 100%;
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.availability-list {
    padding: 1rem 0;
}

.availability-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

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

.availability-indicator {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.availability-indicator.available {
    background: #d4edda;
    color: #155724;
}

.availability-indicator.busy {
    background: #f8d7da;
    color: #721c24;
}

/* ===================================================== 
   21. Skills and Machines Management
   ===================================================== */
.skills-list, .machines-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
}

.skill-item, .machine-item-manage {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.skill-item:hover, .machine-item-manage:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.skill-item.selected, .machine-item-manage.selected {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.skill-level-selector {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.skill-level-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.skill-level-btn:hover {
    background-color: #f8f9fa;
}

.skill-level-btn.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.skill-level-1 { border-left: 4px solid #dc3545; }
.skill-level-2 { border-left: 4px solid #fd7e14; }
.skill-level-3 { border-left: 4px solid #ffc107; }
.skill-level-4 { border-left: 4px solid #198754; }
.skill-level-5 { border-left: 4px solid #0d6efd; }

.skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.skill-badge.level-1 { background-color: #f8d7da; color: #721c24; }
.skill-badge.level-2 { background-color: #fff3cd; color: #856404; }
.skill-badge.level-3 { background-color: #fff3cd; color: #856404; }
.skill-badge.level-4 { background-color: #d4edda; color: #155724; }
.skill-badge.level-5 { background-color: #d1ecf1; color: #0c5460; }

.proficiency-stars {
    color: #ffc107;
}

.proficiency-stars .empty {
    color: #dee2e6;
}

/* ===================================================== 
   22. Responsive Design
   ===================================================== */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .skill-grid, .machine-grid {
        grid-template-columns: 1fr;
    }
    
    .nav {
        flex-direction: column;
        align-items: center;
    }

    .skill-requirement-form,
    div[style*="grid-template-columns: 1fr 1fr auto"] {
        grid-template-columns: 1fr !important;
        gap: 0.5rem;
    }

    .modal-content {
        width: 95%;
        padding: 1rem;
    }
    
    .skills-columns,
    .machines-columns {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sync-buttons {
        grid-template-columns: 1fr;
    }
}