/* Corporate Identity Color Scheme
 * Extracted from logo.png using color analysis
 */

:root {
  /* Brand Colors from Logo */
  --primary-color: #0a8dcd;
  --secondary-color: #3c454f;
  --accent-color: #1f6d98;
  --background-color: #f6f8f7;
  --surface-color: #ffffff;
  
  /* Derived Colors for UI */
  --primary-light: #e3f2fd;
  --primary-dark: #0277bd;
  --secondary-light: #6c757d;
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --text-light: #718096;
  
  /* Button Colors */
  --btn-primary: #0a8dcd;
  --btn-primary-hover: #0277bd;
  --btn-secondary: #3c454f;
  --btn-danger: #e53e3e;
  --btn-success: #38a169;
  
  /* Border and Shadow Colors */
  --border-color: #e2e8f0;
  --shadow-color: rgba(10, 141, 205, 0.1);
  --shadow-strong: rgba(10, 141, 205, 0.15);
  
  /* Status Colors */
  --status-success: #38a169;
  --status-warning: #d69e2e;
  --status-error: #e53e3e;
  --status-info: #0a8dcd;
  
  /* Magic Effect Colors */
  --magic-primary: #0a8dcd;
  --magic-secondary: #1f6d98;
  --magic-accent: #3c454f;
  --magic-gold: #ffd700;
  --magic-light: #e3f2fd;
  
  /* Scrollbar Colors */
  --scrollbar-thumb: #cbd5e1;
  --scrollbar-track: #f1f5f9;
  --scrollbar-thumb-hover: #94a3b8;
  
  /* Table Colors */
  --table-header-bg: #e3f0ff;
  --table-header-text: #2c4c8f;
  --table-hover-bg: #f8fbff;
  --table-conflict-bg: #fef2f2;
  --table-success-bg: #f0fdf4;
  --table-success-text: #16a34a;
  
  /* Bottleneck Colors */
  --bottleneck-bg: #fef7f0;
  --bottleneck-border: #fed7aa;
  --bottleneck-text: #b45309;
  --bottleneck-desc: #7c2d12;
  --bottleneck-item-bg: #ffffff;
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: linear-gradient(120deg, var(--primary-light) 0%, var(--background-color) 100%);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 1200px) {
    body {
        max-width: 1600px;
        padding: 0 0.5rem;
    }
}


/* CSS Grid Layout for Main Container - Desktop Single Screen Layout */
.main-container {
    display: grid;
    grid-template-areas: 
        "header scenarios scenarios"
        "import import import"
        "left-panel preview results"
        "skills settings solve";
    gap: 0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    grid-template-columns: 350px 1fr 1fr;
    grid-template-rows: auto auto 1fr auto;
    height: 100vh;
    max-height: 100vh;
}

/* Task Planner Mode Grid Layout */
.main-container.task-planner-mode {
    grid-template-areas: 
        "header header header"
        "left-panel preview results"
        "bottom-panel bottom-panel bottom-panel";
    grid-template-columns: 350px 1fr 1fr;
    grid-template-rows: auto 1fr auto;
}

/* Task Planner Content Layout */
.task-planner-content {
    display: grid;
    grid-template-areas: 
        "header scenarios scenarios"
        "excel-import excel-import excel-import"
        "tasks-panel tasks-panel tasks-panel"
        "left-panel preview results"
        "skills settings solve";
    grid-template-columns: 350px 1fr 1fr;
    grid-template-rows: auto auto auto 1fr auto;
    gap: 0.75rem;
    padding: 0.75rem;
    height: 100vh;
    max-height: 100vh;
}

/* Compact collapsible sections */
.excel-import-panel,
.tasks-panel {
    transition: all 0.3s ease;
    min-height: 60px; /* Compact when collapsed */
}

.excel-import-panel.collapsed,
.tasks-panel.collapsed {
    height: 60px;
    overflow: hidden;
}

.excel-import-panel.collapsed #excel-content,
.tasks-panel.collapsed #tasks-content {
    display: none;
}

/* Excel import area */
.excel-import-panel {
    grid-area: excel-import;
}

/* Excel import panel content should be scrollable when expanded */
.excel-import-panel #excel-content {
    max-height: 250px; /* Set reasonable max height for excel panel */
    overflow-y: auto;
}

/* Tasks panel area */
.tasks-panel {
    grid-area: tasks-panel;
}

/* Tasks panel content should be scrollable when expanded */
.tasks-panel #tasks-content {
    max-height: 250px; /* Set reasonable max height for tasks panel */
    overflow-y: auto;
}

.tasks-panel #tasks-content #tasks-list {
    max-height: 200px; /* Scrollable task list */
    overflow-y: auto;
    padding: 0.5rem;
}

/* Left panel contains employees and shifts stacked vertically */
.left-panel {
    grid-area: left-panel;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 800px;
    height: 100%;
}

/* Header section for task planner */
.header-section {
    grid-area: header;
}

/* Preview section - adaptive for both shift and task modes */
.preview-section {
    grid-area: preview;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.preview-section .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.preview-section .card-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#task-preview-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#task-preview-table-container {
    flex: 1;
    overflow-y: auto;
}

/* Results section */
.results-section {
    grid-area: results;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.results-section .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.results-section .card-body {
    flex: 1;
    overflow-y: auto;
}

/* Preview table styles - shared between shift and task modes */
.preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.preview-table th {
    background: var(--table-header-bg);
    color: var(--table-header-text);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.preview-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.preview-row.available {
    background: var(--table-success-bg);
}

.preview-row.conflict {
    background: var(--table-conflict-bg);
}

.preview-row.drop-target {
    background: var(--primary-light);
    border: 2px dashed var(--primary-color);
}

.preview-row.new-assignment {
    animation: highlight-new 0.5s ease-in-out;
}

@keyframes highlight-new {
    0% { background: var(--status-success); }
    100% { background: transparent; }
}

/* Task-specific preview styles */
.task-assignment-row {
    transition: all 0.2s ease;
}

.task-drop-zone {
    cursor: pointer;
    position: relative;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

.empty-slot-indicator {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.875rem;
}

.task-drop-zone:hover {
    background: var(--primary-light);
}

/* Drop zone feedback */
.preview-row.available .task-drop-zone {
    border-left: 3px solid var(--status-success);
}

.preview-row.conflict .task-drop-zone {
    border-left: 3px solid var(--status-error);
}

.remove-assignment-btn {
    background: var(--btn-danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.remove-assignment-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Solve section */
.solve-section {
    grid-area: solve;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.solve-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Bottom panel for task planner - contains tasks, skills, and solve */
.bottom-panel {
    grid-area: bottom-panel;
    display: grid;
    grid-template-columns: 1fr 1fr 350px;
    grid-template-areas: "tasks skills solve";
    gap: 0.75rem;
    min-height: 300px;
}

/* Skills Section for Task Planner Mode - in bottom panel */
.skills-section {
    grid-area: skills;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 200px; /* Increased minimum height */
}

.skills-section .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow: hidden;
}

.skills-section #skills-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.skills-section #skills-set {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--primary-light);
    min-height: 120px; /* Ensure minimum usable height */
    /* Improve scrollbar visibility and styling */
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Tasks Section for Task Planner Mode - in bottom panel */
.tasks-section {
    grid-area: tasks;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tasks-section .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tasks-section .items-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Solve section - in bottom panel */
.solve-container {
    grid-area: solve;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* Webkit scrollbar styling for better visibility */
.skills-section #skills-set::-webkit-scrollbar {
    width: 8px;
}

.skills-section #skills-set::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}

.skills-section #skills-set::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.skills-section #skills-set::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Apply same scrollbar styling to other scrollable elements */
.multi-scroll::-webkit-scrollbar,
.tasks-panel #tasks-content::-webkit-scrollbar,
.excel-import-panel #excel-content::-webkit-scrollbar,
#tasks-list::-webkit-scrollbar {
    width: 8px;
}

.multi-scroll::-webkit-scrollbar-track,
.tasks-panel #tasks-content::-webkit-scrollbar-track,
.excel-import-panel #excel-content::-webkit-scrollbar-track,
#tasks-list::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}

.multi-scroll::-webkit-scrollbar-thumb,
.tasks-panel #tasks-content::-webkit-scrollbar-thumb,
.excel-import-panel #excel-content::-webkit-scrollbar-thumb,
#tasks-list::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.multi-scroll::-webkit-scrollbar-thumb:hover,
.tasks-panel #tasks-content::-webkit-scrollbar-thumb:hover,
.excel-import-panel #excel-content::-webkit-scrollbar-thumb:hover,
#tasks-list::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.settings-section {
    grid-area: settings;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.settings-section .card-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.settings-section #settings-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}



/* Specific grid areas */
.scenarios-section {
    grid-area: scenarios;
    max-height: 120px;
    overflow: visible;
}

.employees-section {
    flex: 1;
    min-height: 350px; /* Reduced from 400px */
    height: 50%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.shifts-section {
    flex: 1;
    min-height: 350px; /* Reduced from 400px */
    height: 50%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Collapsible Settings */
.settings-section.collapsed {
    height: 60px;
}

.settings-section.collapsed #settings-content {
    display: none;
}

/* Collapsible Panels for Task Planner */
.excel-import-panel.collapsed #excel-content,
.tasks-panel.collapsed #tasks-content {
    display: none;
}

.excel-import-panel.collapsed,
.tasks-panel.collapsed {
    transition: all 0.3s ease;
}

.excel-import-panel,
.tasks-panel {
    transition: all 0.3s ease;
}

#settings-toggle-btn {
    min-width: 30px;
    padding: 0.25rem 0.5rem;
    background: var(--btn-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#settings-toggle-btn:hover {
    background: var(--btn-primary-hover);
}

#settings-toggle-icon {
    font-weight: bold;
    font-size: 1.2em;
}

/* Optimize component heights for single screen */
.card {
    min-height: 80px;
    position: relative;
}

.card-body {
    min-height: 40px;
}

.multi-scroll {
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--primary-light);
    padding: 0.5em 0.2em;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .main-container {
        grid-template-areas: 
            "header"
            "scenarios"
            "left-panel"
            "preview"
            "results"
            "skills"
            "tasks"
            "settings"
            "solve";
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto 1fr auto auto auto auto auto;
        height: auto;
        max-height: none;
        min-height: 100vh;
    }
    
    .left-panel {
        min-height: auto;
        height: auto;
    }
    
    .preview-section, .results-section {
        min-width: unset;
    }
    
    .employees-section, .shifts-section {
        width: 100%;
        height: auto;
        min-height: 300px;
    }
}

@media (min-width: 1200px) {
    .main-container {
        grid-template-columns: 400px 1fr 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .main-container {
        grid-template-areas: 
            "header"
            "scenarios"
            "left-panel"
            "preview"
            "results"
            "skills"
            "tasks"
            "settings"
            "solve";
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto 1fr auto auto auto auto auto;
        height: auto;
        max-height: none;
        min-height: 100vh;
    }
}
/* Header styling */
header {
    grid-area: header;
    text-align: center;
    padding: 0.5rem;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
    letter-spacing: 1px;
}

header p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Logo styling */
header img {
    height: 40px;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px var(--shadow-color);
}
#forms {
    margin-bottom: 2em;
    background: var(--background-color);
    padding: 1.5em 2em;
    border-radius: 16px;
    box-shadow: 0 3px 16px rgba(53, 98, 200, 0.10), 0 1.5px 6px rgba(140, 140, 140, 0.04);
}
section {
    margin-bottom: 0.5em;
    margin-top: 0.5em;
}

h2 {
    margin-bottom: 0.5em;
    color: var(--text-primary);
}

/* Reusable Component Styles */
.btn {
    margin: 0.15em 0.3em 0.15em 0;
    padding: 0.4em 0.7em;
    border-radius: 7px;
    border: none;
    outline: none;
    font-size: 1em;
    font-family: inherit;
    cursor: pointer;
    background: linear-gradient(90deg, var(--primary-color) 60%, var(--primary-light) 100%);
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(64,112,230,0.08);
    transition: all 0.15s ease;
}

.btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

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

.btn-primary {
    background: linear-gradient(90deg, var(--primary-color) 60%, var(--primary-light) 100%);
}

.btn-danger {
    background: linear-gradient(90deg, var(--btn-danger) 70%, #ffa5a5 100%);
}

.btn-success {
    background: linear-gradient(90deg, var(--primary-color) 60%, var(--magic-light) 100%);
}

.btn-large {
    font-size: 1.18em;
    padding: 0.7em 1.6em;
    border-radius: 12px;
}

.btn-sm {
    font-size: 0.85em;
    padding: 0.25em 0.5em;
    border-radius: 4px;
}

.input-field {
    margin: 0.15em 0.3em 0.15em 0;
    padding: 0.4em 0.7em;
    border-radius: 7px;
    border: 1px solid var(--border-color);
    outline: none;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 112, 230, 0.1);
}

.select-field {
    margin: 0.15em 0.3em 0.15em 0;
    padding: 0.4em 0.7em;
    border-radius: 7px;
    border: 1px solid var(--border-color);
    outline: none;
    font-size: 1em;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.select-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 112, 230, 0.1);
}

.checkbox-field {
    margin-right: 6px;
    accent-color: var(--primary-color);
}

/* Section Grid Areas */
.skills-section { grid-area: skills; }
.employees-section { grid-area: employees; }
.shifts-section { grid-area: shifts; }
.settings-section { grid-area: settings; }
.tasks-section { grid-area: tasks; }
.preview-section { grid-area: preview; }
.scenarios-section { grid-area: scenarios; }
.excel-import-panel { grid-area: excel-import; }
.tasks-panel { grid-area: tasks-panel; }

/* Card Components */
.card {
    background: var(--background-color);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 3px 16px rgba(53, 98, 200, 0.10), 0 1.5px 6px rgba(140, 140, 140, 0.04);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

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

.card-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1em;
    font-weight: 600;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.employees-section .card-body,
.shifts-section .card-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Employee and shift sections need proper scrollable heights */
.employees-section .multi-scroll,
.shifts-section .multi-scroll {
    flex: 1;
    overflow-y: auto;
    max-height: 300px; /* Set proper scroll height instead of none */
    min-height: 200px; /* Ensure minimum usable height */
}

.preview-section .card-body {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
    flex: 1;
}

/* Flexbox utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

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

.justify-between {
    justify-content: space-between;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Live Preview Table Styles */
.preview-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(53, 98, 200, 0.08);
    table-layout: auto;
}

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

.preview-table th {
    background: var(--table-header-bg);
    color: var(--table-header-text);
    font-weight: 700;
    font-size: 0.95em;
}

.preview-table tr:hover {
    background: var(--table-hover-bg);
}

.preview-table .conflict {
    background: var(--table-conflict-bg);
    color: var(--status-error);
}

.preview-table .success {
    background: var(--table-success-bg);
    color: var(--table-success-text);
}

/* Compact Scenario Chooser Styles */
.scenarios-section {
    grid-area: scenarios;
    max-height: 120px; /* Increased from 50px for better button accessibility */
    overflow: visible; /* Changed from hidden to visible */
    min-height: 60px; /* Increased from 50px */
}

.scenario-row {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Reduced gap */
    flex-wrap: wrap;
    padding: 0.25rem 0; /* Reduced padding */
}

.scenario-label {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    font-size: 0.85em; /* Slightly smaller */
}

.scenario-buttons {
    display: flex;
    gap: 0.4rem; /* Reduced gap */
    flex-wrap: wrap;
}

.scenario-btn {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 0.3rem 0.6rem; /* Reduced padding */
    font-size: 0.75em; /* Smaller font */
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.scenario-btn:hover {
    border-color: var(--primary-color);
    background: #f8fbff;
}

.scenario-btn.active {
    border-color: var(--primary-color);
    background: #f8fbff;
    color: var(--primary-color);
}

/* Enhanced Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.3s ease forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-slideIn {
    animation: slideIn 0.4s ease forwards;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Enhanced Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #333;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Enhanced Status Indicators */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.status-available { background-color: var(--status-success); }
.status-conflict { background-color: var(--status-error); }
.status-partial { background-color: var(--status-warning); }
.status-unassigned { background-color: #6b7280; }

/* Interactive Hover Effects */
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(53, 98, 200, 0.15);
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(64, 112, 230, 0.2);
}

.scenario-card:hover .scenario-icon {
    animation: bounce 0.6s ease;
}

.scenario-card.active .scenario-icon {
    animation: pulse 1.5s infinite;
}

/* Enhanced Form Interactions */
.input-field:focus,
.select-field:focus {
    transform: scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 112, 230, 0.1);
}

/* Live Preview Enhancements */
.preview-table tbody tr {
    transition: all 0.3s ease;
}

.preview-table tbody tr:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(64, 112, 230, 0.1);
}

.preview-table .success {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-left: 4px solid var(--status-success);
}

.preview-table .conflict {
    background: linear-gradient(135deg, #fef2f2 0%, #fef7f7 100%);
    border-left: 4px solid var(--status-error);
}

/* Enhanced Magic Effects */
.magic-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--status-error);
    animation: confetti-fall 3s linear infinite;
}

.confetti-piece:nth-child(2n) { background: var(--magic-primary); }
.confetti-piece:nth-child(3n) { background: var(--magic-secondary); }
.confetti-piece:nth-child(4n) { background: var(--magic-gold); }
.confetti-piece:nth-child(5n) { background: var(--magic-accent); }

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Onboarding Hints */
.hint-bubble {
    position: absolute;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9em;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    z-index: 1001;
    max-width: 250px;
    animation: fadeInUp 0.5s ease;
}

.hint-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #667eea;
}

.hint-bubble .hint-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Keyboard Shortcuts Display */
.keyboard-shortcuts {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85em;
    backdrop-filter: blur(10px);
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.keyboard-shortcuts.show {
    opacity: 1;
    transform: translateY(0);
}

.keyboard-shortcuts kbd {
    background: #333;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

/* Loading States */
.loading-state {
    position: relative;
    overflow: hidden;
}

.loading-state::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent
    );
    animation: shimmer 1.5s infinite;
}

/* Success/Error Messages */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.4s ease;
}

.message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--status-error);
}

.message.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Indicators */
button:focus-visible,
input:focus-visible,
select:focus-visible,
.scenario-card:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid black;
    }
    
    .btn {
        border: 2px solid black;
    }
    
    .preview-table {
        border: 2px solid black;
    }
}

/* Update existing styles to use new classes */
input, select {
    margin: 0.15em 0.3em 0.15em 0;
    padding: 0.4em 0.7em;
    border-radius: 7px;
    border: 1px solid var(--border-color);
    outline: none;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 112, 230, 0.1);
}

button {
    margin: 0.15em 0.3em 0.15em 0;
    padding: 0.4em 0.7em;
    border-radius: 7px;
    border: none;
    outline: none;
    font-size: 1em;
    font-family: inherit;
    cursor: pointer;
    background: linear-gradient(90deg, var(--primary-color) 60%, var(--primary-light) 100%);
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(64,112,230,0.08);
    transition: all 0.15s ease;
}

button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}
button.solve-btn {
    font-size:1.18em;
    padding:0.7em 1.6em;
    border-radius:12px;
    background:linear-gradient(90deg,#3e90f0 60%,#6bdfd6 100%);
}
.qol-bar {
    margin-bottom: 0.5em;
    background: #eaf4ff;
    border-radius: 7px;
    padding: 0.3em 0.5em;
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.skill-tag {
    display: inline-block;
    margin: 0.15em 0.2em;
    padding: 0.13em 0.85em;
    background: #d0eaff;
    border-radius: 16px;
    font-size: 0.96em;
    border: 1px solid #b3d8f7;
    color: #1565a2;
    font-weight: 500;
    vertical-align: middle;
}
.remove-btn {
    color: #bb1a1a;
    cursor: pointer;
    margin-left: 0.35em;
    font-size: 1.14em;
    font-weight: bold;
    vertical-align: middle;
}
fieldset {
    border: 1.2px solid #9eb6ea;
    border-radius: 11px;
    margin: 0.8em 0 0.8em 0;
    padding: 0.8em 1.2em 0.7em 1.2em;
    background: var(--background-color);
    box-shadow: 0 1.5px 5px rgba(53, 98, 200, 0.04);
}
legend {
    color: #3d5ea1;
    font-weight: 600;
    padding: 0 0.7em;
    font-size: 1em;
}
.employee-card, .shift-card {
    margin-bottom: 1em;
    background: white;
    border-radius: 10px;
    padding: 0.8em 1em 0.4em 1em;
    box-shadow: 0 2px 16px rgba(53, 98, 200, 0.06);
    border: 1px solid var(--border-color);
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.employee-card button,
.shift-card button {
    font-size: 0.9em;
    background: linear-gradient(90deg, var(--btn-danger) 70%, #ffa5a5 100%);
    margin-left: 1em;
    margin-top: 0.4em;
    margin-bottom: 0.8em;
    color: white;
    border: none;
}
.employee-card button:hover,
.shift-card button:hover {
    filter: brightness(1.08);
    background: #d84141;
}
.employee-title {
    font-size: 1.08em;
    font-weight: 600;
    color: #25447e;
    margin-right: 0.8em;
    margin-bottom: 0.3em;
}
.shift-title {
    font-size: 1.08em;
    font-weight: 600;
    color: #274f7e;
    margin-right: 0.8em;
}
.availability-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-bottom: 0.4em;
}
.availability-checkboxes label {
    font-size: 0.97em;
    margin-right: 0.3em;
}
.skills-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-bottom: 0.5em;
}
.skills-checkboxes label {
    font-size: 0.97em;
    margin-right: 0.3em;
}
#skills-set {
    margin-bottom: 0.5em;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0;
}

.settings-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9em;
    color: #374151;
}

.settings-grid input[type="number"] {
    width: 50px;
    flex-shrink: 0;
}

/* Fix for existing styles */
#forms {
    margin-bottom: 2em;
    background: var(--background-color);
    padding: 1.5em 2em;
    border-radius: 16px;
    box-shadow: 0 3px 16px rgba(53, 98, 200, 0.10), 0 1.5px 6px rgba(140, 140, 140, 0.04);
}



.employee-card, .shift-card {
    margin-bottom: 1em;
    background: white;
    border-radius: 10px;
    padding: 0.8em 1em 0.4em 1em;
    box-shadow: 0 2px 16px rgba(53, 98, 200, 0.06);
    border: 1px solid var(--border-color);
    position: relative;
}

.employee-card button,
.shift-card button {
    font-size: 0.9em;
    background: linear-gradient(90deg, var(--btn-danger) 70%, #ffa5a5 100%);
    margin-left: 1em;
    margin-top: 0.4em;
    margin-bottom: 0.8em;
    color: white;
    border: none;
}

.employee-card button:hover,
.shift-card button:hover {
    filter: brightness(1.08);
    background: #d84141;
}

.employee-title {
    font-size: 1.08em;
    font-weight: 600;
    color: #25447e;
    margin-right: 0.8em;
    margin-bottom: 0.3em;
}

.shift-title {
    font-size: 1.08em;
    font-weight: 600;
    color: #274f7e;
    margin-right: 0.8em;
}

.availability-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-bottom: 0.4em;
}

.availability-checkboxes label {
    font-size: 0.97em;
    margin-right: 0.3em;
}

.skills-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-bottom: 0.5em;
}

.skills-checkboxes label {
    font-size: 0.97em;
    margin-right: 0.3em;
}

.skill-tag {
    display: inline-block;
    margin: 0.15em 0.2em;
    padding: 0.13em 0.85em;
    background: #d0eaff;
    border-radius: 16px;
    font-size: 0.96em;
    border: 1px solid #b3d8f7;
    color: #1565a2;
    font-weight: 500;
    vertical-align: middle;
}

.remove-btn {
    color: #bb1a1a;
    cursor: pointer;
    margin-left: 0.35em;
    font-size: 1.14em;
    font-weight: bold;
    vertical-align: middle;
}

fieldset {
    border: 1.2px solid #9eb6ea;
    border-radius: 11px;
    margin: 0.8em 0 0.8em 0;
    padding: 0.8em 1.2em 0.7em 1.2em;
    background: var(--background-color);
    box-shadow: 0 1.5px 5px rgba(53, 98, 200, 0.04);
}

legend {
    color: #3d5ea1;
    font-weight: 600;
    padding: 0 0.7em;
    font-size: 1em;
}

/* Results section styling */
.results-section .card-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

#result {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    min-height: 40px;
    position: relative;
}

#result table {
    border-collapse: collapse;
    margin-top: 1em;
    width: 100%;
    font-size: 0.9em;
    background: #f8fbff;
    border-radius: 8px;
    overflow: hidden;
}

#result th, #result td {
    border: 1px solid #c9e0fd;
    padding: 0.4em 0.6em;
    text-align: left;
    font-size: 0.85em;
}

#result th {
    background: #e3f0ff;
    color: #2c4c8f;
    font-weight: 700;
}

#result tr:nth-child(even) {
    background: var(--background-color);
}

/* Update media queries */
@media (max-width: 1100px) {
    .main-container {
        padding: 0.5rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .employee-card, .shift-card { 
        padding: 0.6em 0.7em 0.4em 0.7em; 
    }
    
    .preview-table th, .preview-table td { 
        padding: 0.3em 0.5em; 
    }
    
    .settings-grid { 
        grid-template-columns: 1fr;
        gap: 0.5rem; 
    }
    
    .scenario-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .qol-bar {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .qol-bar button {
        width: 100%;
    }
    
    .card-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

.multi-scroll {
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--primary-light);
    padding: 0.5em 0.2em;
}

/* Magic effect styles */
#magic-effect {
    pointer-events: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 99;
    display: none;
}
.magic-star {
    position: absolute;
    width: 36px;
    height: 36px;
    opacity: 0.9;
    pointer-events: none;
    animation: sparkle 1.1s linear forwards;
}
@keyframes sparkle {
    0% { opacity: 0.1; transform: scale(0.6) rotate(-20deg);}
    30% { opacity: 1; transform: scale(1.2) rotate(10deg);}
    75% { opacity: 0.8; }
    100% { opacity: 0; transform: scale(0.7) rotate(40deg);}
}

/* Enhanced magic effect animations */
@keyframes spotlight-reveal {
    0% { 
        opacity: 0; 
        transform: scale(0.8); 
        box-shadow: 0 0 0 var(--magic-gold), inset 0 0 0 rgba(255, 215, 0, 0);
    }
    30% { 
        opacity: 1; 
        transform: scale(1.05); 
        box-shadow: 0 0 30px var(--magic-gold), inset 0 0 30px rgba(255, 215, 0, 0.2);
    }
    100% { 
        opacity: 0.8; 
        transform: scale(1); 
        box-shadow: 0 0 20px var(--magic-gold), inset 0 0 20px rgba(255, 215, 0, 0.1);
    }
}

@keyframes badge-appear {
    0% { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.8); 
    }
    50% { 
        opacity: 1; 
        transform: translateY(-10px) scale(1.1); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

@keyframes particle-confetti {
    0% { 
        opacity: 1; 
        transform: translate(0, 0) rotate(0deg) scale(1); 
    }
    100% { 
        opacity: 0; 
        transform: translate(calc(var(--endX) - 50vw), calc(var(--endY) - 50vh)) rotate(360deg) scale(0.3); 
    }
}

@keyframes particle-sparkle {
    0% { 
        opacity: 1; 
        transform: translate(0, 0) scale(0.5); 
        box-shadow: 0 0 5px currentColor;
    }
    50% { 
        opacity: 1; 
        transform: translate(calc((var(--endX) - 50vw) * 0.5), calc((var(--endY) - 50vh) * 0.5)) scale(1.2); 
        box-shadow: 0 0 15px currentColor;
    }
    100% { 
        opacity: 0; 
        transform: translate(calc(var(--endX) - 50vw), calc(var(--endY) - 50vh)) scale(0.2); 
        box-shadow: 0 0 3px currentColor;
    }
}

@keyframes particle-star {
    0% { 
        opacity: 1; 
        transform: translate(0, 0) rotate(0deg) scale(0.8); 
    }
    100% { 
        opacity: 0; 
        transform: translate(calc(var(--endX) - 50vw), calc(var(--endY) - 50vh)) rotate(180deg) scale(0.3); 
    }
}

/* Accessibility - reduced motion alternatives */
@keyframes simple-glow {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

@keyframes simple-fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Result emphasis styles */
.magic-spotlight {
    pointer-events: none;
}

.magic-summary-badge {
    pointer-events: none;
}

.magic-particle {
    pointer-events: none;
}

.results-highlight {
    animation: results-fadeIn 1s ease-out;
    border: 2px solid var(--magic-gold);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

@keyframes results-fadeIn {
    0% { 
        opacity: 0; 
        transform: translateY(10px); 
        background: rgba(255, 215, 0, 0.1);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
        background: transparent;
    }
}

@media (max-width: 1100px) {
    #forms { padding: 10px; }
    .employee-card, .shift-card { padding: 0.6em 0.7em 0.4em 0.7em; }
    th, td { padding: 0.3em 0.5em; }
    #settings-panel { flex-direction: column; gap: 0.4em; }
}

/* Bottleneck display styles */
.bottleneck-section {
    margin-bottom: 2em;
    background: var(--bottleneck-bg);
    padding: 1.5em;
    border-radius: 12px;
    border-left: 4px solid var(--status-warning);
}

.bottleneck-section h3 {
    margin-top: 0;
    color: var(--bottleneck-text);
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.bottleneck-list {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.bottleneck-item {
    background: var(--bottleneck-item-bg);
    padding: 1em;
    border-radius: 8px;
    border: 1px solid var(--bottleneck-border);
}

.bottleneck-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.5em;
}

.bottleneck-icon {
    font-size: 1.2em;
}

.bottleneck-type {
    font-weight: 600;
    color: var(--bottleneck-text);
}

.bottleneck-explanation {
    color: var(--bottleneck-desc);
    margin-bottom: 0.5em;
}

.bottleneck-suggestion {
    color: var(--bottleneck-desc);
    font-size: 0.9em;
}

.solution-section {
    margin-top: 2em;
    background: #f0f9ff;
    padding: 1.5em;
    border-radius: 12px;
    border-left: 4px solid #0ea5e9;
}

.solution-section h3 {
    margin-top: 0;
    color: #0c4a6e;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.solution-nav {
    margin-bottom: 1em;
}

.solution-nav button {
    margin-right: 0.5em;
    margin-bottom: 0.5em;
}

.no-solution-message {
    color: var(--bottleneck-text);
    font-weight: 600;
    margin-top: 1em;
    padding: 1em;
    background: var(--bottleneck-bg);
    border-radius: 8px;
    border: 1px solid var(--bottleneck-border);
}

/* Help button styles */
.help-btn {
    background: var(--btn-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.help-btn:hover {
    background: var(--btn-primary-hover);
    transform: scale(1.1);
}

.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.help-modal.show {
    opacity: 1;
    visibility: visible;
}

.help-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.help-modal.show .help-modal-content {
    transform: scale(1);
}

.help-modal h3 {
    margin-top: 0;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.help-modal-close {
    float: right;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    border: none;
    background: none;
    padding: 0;
    margin: -8px -8px 0 0;
}

.help-modal-close:hover {
    color: #374151;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* Utility classes */
.flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.justify-between {
    justify-content: space-between;
}

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

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

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

.btn-danger:hover {
    background-color: #b91c1c;
}

/* Better alignment for shift details */
.shift-details-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.shift-details-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.shift-details-grid input {
    padding: 0.375rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

/* Drag and drop styles */
.draggable {
    cursor: move;
    transition: all 0.2s ease;
}

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

.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.drop-zone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    color: #6b7280;
    transition: all 0.2s ease;
}

.drop-zone.drag-over {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

.preview-row {
    transition: all 0.3s ease;
}

.preview-row.drop-target {
    background: #f0f9ff;
    border: 2px dashed #3b82f6;
}

.preview-row.new-assignment {
    background: #f0fdf4;
    animation: slideIn 0.5s ease-out;
}

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

/* Enhanced drag and drop styles */
.drag-image {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: 14px;
    z-index: 1000;
}

.drag-employee-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drag-employee-name {
    font-weight: 600;
    color: var(--text-primary);
}

.drag-employee-skills {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Task drag styles */
.drag-task-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drag-task-name {
    font-weight: 600;
    color: var(--text-primary);
}

.drag-task-skills {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Task card draggable styles */
.task-card[draggable="true"] {
    cursor: move;
    transition: all 0.2s ease;
}

.task-card[draggable="true"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.task-card.dragging {
    opacity: 0.6;
    transform: rotate(3deg) scale(0.95);
}

/* Shift compatibility highlighting */
.compatible-shift {
    background: #f0f9ff !important;
    border-left: 4px solid var(--status-success) !important;
}

.incompatible-shift {
    background: #fef2f2 !important;
    border-left: 4px solid var(--status-error) !important;
}

/* Task assignment visual feedback */
.task-assignment-success {
    background: var(--status-success);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    animation: fadeInUp 0.3s ease;
}

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

.empty-slot {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
}

.empty-slot-indicator {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 8px;
}

.compatible-drop-zone {
    background: #f0f9ff !important;
    border-color: #3b82f6 !important;
}

.incompatible-drop-zone {
    background: #fef2f2 !important;
    border-color: var(--status-error) !important;
}

.invalid-drop-target {
    background: #fef2f2;
    border: 2px dashed var(--status-error);
}

.successful-drop {
    background: #f0fdf4;
    animation: successPulse 1s ease-out;
}

@keyframes successPulse {
    0% { background: var(--status-success); }
    100% { background: #f0fdf4; }
}

.remove-assignment-btn {
    background: var(--status-error);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.remove-assignment-btn:hover {
    background: var(--status-error);
}

.assignment-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.assignment-stats span {
    padding: 0.25rem 0.5rem;
    background: #f1f5f9;
    border-radius: 4px;
}

/* Task Planner Styles */
.task-planner-main {
    background: linear-gradient(120deg, var(--primary-light) 0%, var(--background-color) 100%);
    min-height: 100vh;
    padding: 2rem;
}

.task-planner-ui {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.task-planner-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.task-planner-header h2 {
    color: #1e293b;
    margin: 0;
    flex: 1;
    text-align: center;
}

.task-planner-header .btn {
    padding: 0.5rem 1rem;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.task-planner-header .btn:hover {
    background: #4b5563;
}

.task-planner-ui h2 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    text-align: center;
}

.task-planner-sections {
    display: grid;
    grid-template-areas: "employees shifts tasks";
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.task-planner-sections .section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.task-planner-sections .section h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.employees-section {
    grid-area: employees;
}

.shifts-section {
    grid-area: shifts;
}

.tasks-section {
    grid-area: tasks;
}

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

.input-group input {
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.875rem;
}

.input-group button {
    padding: 0.5rem 1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}

.input-group button:hover {
    background: #2563eb;
}

.items-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.remove-btn {
    background: var(--status-error);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
}

.remove-btn:hover {
    background: var(--status-error);
}

.skills-section {
    grid-area: skills;
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.skills-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.skills-checkboxes label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}

.skills-checkboxes label:hover {
    background: #f1f5f9;
}

.skills-checkboxes input[type="checkbox"] {
    margin: 0;
}

.availability-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.availability-checkboxes label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}

.availability-checkboxes label:hover {
    background: #f1f5f9;
}

.availability-checkboxes input[type="checkbox"] {
    margin: 0;
}

.skill-pool-section {
    margin-bottom: 1rem;
}

.skill-pool-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.skill-pool-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.875rem;
}

.skill-pool-input button {
    padding: 0.5rem 1rem;
    background: var(--status-success);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}

.skill-pool-input button:hover {
    background: var(--status-success);
}

.skill-pool-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    font-size: 0.875rem;
}

.skill-tag .remove-skill {
    background: var(--status-error);
    color: white;
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-tag .remove-skill:hover {
    background: var(--status-error);
}

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

.solve-button {
    background: var(--status-success);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.solve-button:hover {
    background: var(--status-success);
}

.clear-button {
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.clear-button:hover {
    background: #4b5563;
}

.results-display {
    background: #f0f9ff;
    border: 1px solid #0284c7;
    border-radius: 8px;
    padding: 1.5rem;
}

.results-display h3 {
    color: #0c4a6e;
    margin-bottom: 1rem;
}

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

.assignment-card {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid #bae6fd;
    box-shadow: 0 1px 3px -1px rgba(0, 0, 0, 0.1);
}

.assignment-card h4 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
}

.assignment-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.employees-assigned, .tasks-assigned {
    font-size: 0.875rem;
}

.employees-assigned strong, .tasks-assigned strong {
    color: #374151;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #f87171;
    border-radius: 8px;
    padding: 1.5rem;
    color: #b91c1c;
}

.error-message h3 {
    color: var(--status-error);
    margin-bottom: 0.5rem;
}

/* Responsive design for task planner */
@media (max-width: 1200px) {
    .task-planner-sections {
        grid-template-areas: 
            "employees employees"
            "shifts tasks";
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .task-planner-sections {
        grid-template-areas: 
            "employees"
            "shifts" 
            "tasks";
        grid-template-columns: 1fr;
    }
    
    .task-planner-main {
        padding: 1rem;
    }
    
    .task-planner-ui {
        padding: 1rem;
    }
    
    .assignments-grid {
        grid-template-columns: 1fr;
    }
}

/* Excel Import Component Styles */
#excel-import-container {
    grid-area: import;
}

.excel-import-panel {
    margin-bottom: 1rem;
}

.excel-import-panel .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
}

.excel-import-panel .card-body {
    padding: 1rem;
}

.import-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.file-input-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-input {
    display: none;
}

.file-input-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #3b82f6;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-input-label:hover {
    background: #2563eb;
}

.file-name {
    font-size: 0.9em;
    color: var(--text-secondary);
    font-style: italic;
}

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

.import-actions .btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.import-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.import-actions .btn-primary {
    background: #3b82f6;
    color: white;
}

.import-actions .btn-primary:hover:not(:disabled) {
    background: #2563eb;
}

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

.import-actions .btn-success:hover:not(:disabled) {
    background: var(--status-success);
}

.import-actions .btn-secondary {
    background: #6b7280;
    color: white;
}

.import-actions .btn-secondary:hover {
    background: #4b5563;
}

.template-links {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    margin: 0.5rem 0;
}

.template-links-header {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.template-links-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.template-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: whitefff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.template-link:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #2563eb;
    text-decoration: none;
}

.large-dataset-highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #f3f4f6 100%) !important;
    border: 2px solid #f59e0b !important;
    position: relative;
    overflow: hidden;
}

.large-dataset-highlight:hover {
    background: linear-gradient(135deg, #fde68a 0%, #e5e7eb 100%) !important;
    border-color: #d97706 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.performance-badge {
    background: linear-gradient(90deg, #f59e0b, #f97316);
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    margin-left: 0.5rem;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.6), 0 0 25px rgba(245, 158, 11, 0.3); }
}

/* Enhanced solution presentation styles */
.solution-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f7fa 100%);
    border-radius: 8px;
    border: 1px solid #b3e5fc;
}

.solution-title h3 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.solution-summary {
    font-size: 0.9rem;
    color: #546e7a;
    font-weight: 500;
}

.solution-performance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.performance-metric {
    background: linear-gradient(90deg, #4caf50, #45a049);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.large-solve-badge {
    background: linear-gradient(90deg, #f59e0b, #f97316);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    animation: subtle-pulse 2s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.solution-nav button.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(10, 141, 205, 0.3);
}

.export-btn-highlight {
    animation: export-highlight 1s ease-out;
}

@keyframes export-highlight {
    0% { 
        transform: scale(1); 
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 4px 20px rgba(10, 141, 205, 0.4);
        background: linear-gradient(90deg, #0891b2, #0284c7) !important;
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
}

/* Congratulations message styles */
.congratulations-message {
    pointer-events: auto;
}

.congrats-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    max-width: 400px;
    position: relative;
}

.congrats-icon {
    font-size: 2rem;
    animation: bounce-celebration 1s ease-out;
}

@keyframes bounce-celebration {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.congrats-text {
    flex: 1;
}

.congrats-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.congrats-detail {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.3;
}

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

.congrats-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes congrats-slideIn {
    0% { 
        opacity: 0; 
        transform: translateX(-50%) translateY(-20px); 
    }
    100% { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0); 
    }
}

@keyframes congrats-slideOut {
    0% { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0); 
    }
    100% { 
        opacity: 0; 
        transform: translateX(-50%) translateY(-20px); 
    }
}

.import-preview {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

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

.preview-stats {
    display: flex;
    gap: 1rem;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-label {
    font-weight: 500;
    color: #374151;
}

.stat-value {
    font-weight: 600;
    color: #1f2937;
}

.stat-value.error {
    color: var(--status-error);
}

.stat-value.warning {
    color: #d97706;
}

.validation-messages {
    margin-bottom: 1rem;
}

.message-header {
    font-weight: 600;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.message-header.error {
    background: #fef2f2;
    color: var(--status-error);
}

.message-header.warning {
    background: whitebeb;
    color: #d97706;
}

.message-list {
    max-height: 150px;
    overflow-y: auto;
    margin: 0;
    padding-left: 1.5rem;
}

.message-list li {
    margin-bottom: 0.25rem;
    font-size: 0.9em;
}

.preview-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn.active {
    border-bottom-color: #3b82f6;
    color: #3b82f6;
    font-weight: 500;
}

.tab-btn:hover {
    background: #f1f5f9;
}

.tab-content {
    display: none;
}

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

.preview-table-container {
    max-height: 400px;
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.preview-table th {
    background: #f8fafc;
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.preview-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.preview-table tr:hover {
    background: #f8fafc;
}

.preview-table tr.error {
    background: #fef2f2;
}

.preview-table tr.warning {
    background: whitebeb;
}

.status-ok {
    color: var(--status-success);
    font-weight: 500;
}

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

.status-warning {
    color: #d97706;
    font-weight: 500;
}

@media (max-width: 768px) {
    .import-controls {
        flex-direction: column;
    }
    
    .file-input-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .preview-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .preview-table-container {
        font-size: 0.8em;
    }
}

/* ===============================================
   Task Planner Advanced Features Styles
   =============================================== */

/* Scenario Templates Section */
.templates-section {
    margin-bottom: 1rem;
}

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

.template-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    background: var(--surface-color);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-strong);
    border-color: var(--primary-color);
}

.template-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.template-icon {
    font-size: 1.5rem;
}

.template-name {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.template-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.template-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.template-stats .stat {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.template-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.template-actions .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

/* Multiple Solutions Panel */
.multiple-solutions-panel {
    margin-bottom: 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.solutions-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.solutions-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.solution-info {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--primary-light);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

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

.solution-details {
    margin-bottom: 1rem;
}

.solution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.solution-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--background-color);
    padding: 0.5rem;
    border-radius: 4px;
    min-width: 80px;
}

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

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.solution-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.solution-tabs .tab-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.solution-tabs .tab-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.solution-tabs .tab-btn.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.tab-content {
    display: none;
}

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

.solution-preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

.solution-preview-table th {
    background: var(--background-color);
    font-weight: 600;
    color: var(--text-primary);
}

.solutions-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.solutions-comparison-table th,
.solutions-comparison-table td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.solutions-comparison-table th {
    background: var(--background-color);
    font-weight: 600;
}

.best-value {
    background: var(--status-success);
    color: white;
    font-weight: 600;
}

.detailed-statistics {
    display: grid;
    gap: 1.5rem;
}

.stats-section h5 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.stats-grid {
    display: grid;
    gap: 0.5rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--background-color);
    border-radius: 4px;
}

.quality-indicator {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.quality-indicator.excellent {
    background: var(--status-success);
    color: white;
}

.quality-indicator.good {
    background: var(--status-info);
    color: white;
}

.quality-indicator.fair {
    background: var(--status-warning);
    color: white;
}

.quality-indicator.poor {
    background: var(--status-error);
    color: white;
}

/* Task Excel Import/Export Enhancements */
.task-excel-import-panel {
    margin-bottom: 1rem;
}

.task-excel-import-panel .template-links-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.task-excel-import-panel .template-link {
    display: block;
    padding: 0.5rem;
    background: var(--primary-light);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.task-excel-import-panel .template-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

.task-excel-import-panel .preview-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.task-excel-import-panel .tab-btn {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
}

.task-excel-import-panel .tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Task Planner Messages */
.task-planner-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease-out;
}

.task-planner-message.alert-success {
    background: var(--status-success);
    color: white;
    border: 1px solid var(--status-success);
}

.task-planner-message.alert-error {
    background: var(--status-error);
    color: white;
    border: 1px solid var(--status-error);
}

.task-planner-message .alert-icon {
    font-size: 1.2rem;
}

.task-planner-message .alert-text {
    flex: 1;
    font-weight: 500;
}

.task-planner-message .alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.task-planner-message .alert-close:hover {
    opacity: 1;
}

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

/* Bottom Panel Layout for Task Planner */
.bottom-panel {
    grid-area: bottom-panel;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    overflow: hidden;
}

.bottom-panel .tasks-section,
.bottom-panel .skills-section,
.bottom-panel .templates-section,
.bottom-panel .excel-section,
.bottom-panel .solutions-section,
.bottom-panel .solve-container {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Responsive Design for Advanced Features */
@media (max-width: 1200px) {
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .solutions-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .solution-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bottom-panel {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .template-stats {
        gap: 0.5rem;
    }
    
    .template-actions {
        justify-content: stretch;
    }
    
    .template-actions .btn {
        flex: 1;
    }
    
    .solutions-navigation {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .solution-actions {
        flex-direction: column;
    }
    
    .stat-item {
        min-width: 60px;
    }
    
    .task-planner-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
