/* Robot Manufacturing System - Main Stylesheet */

/* Base Styles */
:root {
    --primary-color: #2196f3;
    --primary-hover: #1976d2;
    --primary-light: #e3f2fd;
    --accent-color: #ff4081;
    --error-color: #f44336;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --text-primary: #212121;
    --text-secondary: #757575;
    --bg-color: #f5f5f5;
    --card-color: #ffffff;
    --border-color: #e0e0e0;
    --sidebar-width: 240px;
    --topbar-height: 64px;
    --shadow-light: 0 2px 5px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 10px rgba(0,0,0,0.15);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100%;
    line-height: 1.6;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-color);
    border-right: 1px solid var(--border-color);
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-light);
}

.sidebar-header {
    padding: 20px;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h1 {
    font-size: 20px;
    font-weight: 500;
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.nav-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.nav-item .material-icons {
    margin-right: 15px;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 0;
    margin-left: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: var(--topbar-height);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-color);
}

.top-bar h2 {
    font-size: 20px;
    font-weight: 500;
}

.top-bar .actions {
    display: flex;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.primary-btn:hover {
    background-color: var(--primary-hover);
}

.primary-btn .material-icons {
    margin-right: 8px;
}

#view-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

.card {
    background-color: var(--card-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-light);
}

.card h3 {
    margin-bottom: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Dashboard Components */
.stats {
    display: flex;
    justify-content: space-between;
}

.stat {
    text-align: center;
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 500;
    color: var(--primary-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Task Status */
.status-bar {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    margin-bottom: 8px;
}

.status-progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}

.task-counts {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    flex-wrap: wrap;
}

.task-count-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-dot.pending {
    background-color: var(--warning-color);
}

.status-dot.in-progress {
    background-color: var(--primary-color);
}

.status-dot.completed {
    background-color: var(--success-color);
}

/* Dashboard Tables */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.dashboard-table th, 
.dashboard-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-table th {
    font-weight: 500;
    color: var(--text-secondary);
}

.upcoming-item.clickable {
    cursor: pointer;
}

.upcoming-item.clickable:hover {
    background-color: var(--primary-light);
}

.priority-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    text-transform: capitalize;
}

.priority-badge.high {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--error-color);
}

.priority-badge.medium {
    background-color: rgba(255, 152, 0, 0.1);
    color: var(--warning-color);
}

.priority-badge.low {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

/* Resource Utilization */
.progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
}

.progress-bar span {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: white;
    text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.5);
}

/* Card Header with Actions */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-header h3 {
    margin-bottom: 0;
}

/* Export Button */
.export-btn {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--primary-color);
}

.export-btn:hover {
    background-color: var(--primary-light);
}

.export-btn .material-icons {
    font-size: 18px;
    margin-right: 4px;
}

/* Notification Banner */
.notification-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: var(--primary-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    margin-bottom: 15px;
}

.notification-banner p {
    margin: 0;
}

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.error-state .material-icons {
    font-size: 48px;
    color: var(--error-color);
    margin-bottom: 16px;
}

/* Loading State */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-spinner:before {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* List Views */
.list-container {
    background-color: var(--card-color);
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.list-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    border-radius: 24px;
    padding: 8px 16px;
    flex: 1;
    max-width: 400px;
}

.search-container .material-icons {
    color: var(--text-secondary);
    margin-right: 8px;
}

.search-container input {
    border: none;
    background: transparent;
    flex: 1;
    outline: none;
    font-size: 16px;
}

.filter-container .filter-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.filter-btn .material-icons {
    margin-right: 8px;
}

.items-list {
    padding: 16px;
}

.list-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.list-item:hover {
    background-color: var(--primary-light);
}

.list-item:last-child {
    border-bottom: none;
}

.item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.item-title {
    font-weight: 500;
}

.item-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.empty-state {
    color: var(--text-secondary);
    text-align: center;
    padding: 32px 16px;
    font-style: italic;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    background-color: var(--card-color);
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-medium);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-body {
    padding: 16px;
    overflow-y: auto;
    flex-grow: 1;
}

.error-list {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    background-color: #fff8f8;
    line-height: 1.8;
    font-size: 14px;
}

.close-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

.close-btn:hover {
    color: var(--text-primary);
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.btn {
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-color);
}

/* Task Management */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h4 {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

.add-task-btn {
    display: flex;
    align-items: center;
    font-size: 14px;
    padding: 6px 12px;
}

.add-task-btn .material-icons {
    font-size: 16px;
    margin-right: 4px;
}

.task-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.task-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.task-item {
    display: flex;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: white;
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.task-item:hover {
    background-color: var(--primary-light);
    box-shadow: var(--shadow-light);
}

.task-item.dragging {
    opacity: 0.8;
    box-shadow: var(--shadow-medium);
    background-color: var(--primary-light);
}

.task-drag-handle {
    cursor: grab;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.task-content {
    flex: 1;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.task-name {
    font-weight: 500;
}

.task-actions {
    display: flex;
    gap: 8px;
    opacity: 0.6;
    transition: opacity var(--transition-speed);
}

.task-item:hover .task-actions {
    opacity: 1;
}

.task-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed);
}

.task-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.edit-task-btn {
    color: var(--primary-color);
}

.delete-task-btn {
    color: var(--error-color);
}

.task-description {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.task-details {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.task-time, .task-resources {
    display: flex;
    align-items: center;
}

.task-details .material-icons {
    font-size: 14px;
    margin-right: 4px;
}

.part-details {
    padding-bottom: 16px;
}

/* Utilities */
.hidden {
    display: none;
}

.view {
    width: 100%;
    height: 100%;
}

/* Copy functionality styles */
.copy-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.copy-btn .material-icons {
    font-size: 16px;
    margin-right: 4px;
}

.copy-btn:hover {
    background-color: var(--primary-light);
    border-radius: 4px;
}

/* Part selection in component form */
.parts-selection {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
}

.part-selection-item {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.part-selection-item:last-child {
    border-bottom: none;
}

.part-selection-item label {
    margin-left: 8px;
    cursor: pointer;
}

.part-quantity-container {
    margin-top: 8px;
    margin-left: 25px;
    padding: 8px;
    background-color: #f9f9f9;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.part-quantity-container label {
    margin-right: 5px;
}

.part-quantity {
    width: 60px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.part-notes {
    flex-grow: 1;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

/* Component selection in robot model form */
.components-selection {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
}

.component-selection-item {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.component-selection-item:last-child {
    border-bottom: none;
}

.component-selection-item label {
    margin-left: 8px;
    cursor: pointer;
}

.component-quantity-container {
    margin-top: 8px;
    margin-left: 25px;
    padding: 8px;
    background-color: #f9f9f9;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.component-quantity-container label {
    margin-right: 5px;
}

.component-quantity {
    width: 60px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.component-notes {
    flex-grow: 1;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

/* Bill of Materials */
.bom-container {
    padding: 10px;
}

.bom-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.bom-table th, 
.bom-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.bom-table th {
    background-color: #f5f5f5;
    font-weight: 500;
}

.bom-container h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #333;
}

/* Production Orders Styles */

.orders-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.order-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.order-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.order-body {
    padding: 1rem;
}

.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-weight: 500;
}

.notes-item {
    grid-column: 1 / -1;
}

.progress-container {
    margin: 0.5rem 0;
}

.progress-bar {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #4caf50;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
    text-align: right;
}

.order-actions {
    display: flex;
    border-top: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-planned {
    background-color: #e3f2fd;
    color: #1565c0;
}

.status-in-progress {
    background-color: #fff8e1;
    color: #ff8f00;
}

.status-completed {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-cancelled {
    background-color: #ffebee;
    color: #c62828;
}

.status-pending {
    background-color: #f5f5f5;
    color: #616161;
}

.priority-low {
    color: #2e7d32;
}

.priority-medium {
    color: #1565c0;
}

.priority-high {
    color: #ff8f00;
}

.priority-urgent {
    color: #c62828;
    font-weight: bold;
}

.header-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.header-with-button h2 {
    margin: 0;
}

.center-button {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Order Details Modal */

.order-details-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-summary {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 1rem;
}

.summary-header {
    margin-bottom: 1rem;
}

.summary-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.summary-title h3 {
    margin: 0;
}

.summary-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.tasks-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.tasks-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.part-tasks-group {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.part-tasks-group h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #333;
}

.tasks-table {
    width: 100%;
    border-collapse: collapse;
}

.tasks-table th,
.tasks-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.tasks-table th {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.tasks-table tr:last-child td {
    border-bottom: none;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    padding: 0.25rem;
}

.icon-btn:hover {
    color: #1976d2;
}

/* Schedule View and Gantt Chart */
.schedule-container {
    background-color: var(--card-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-light);
    height: calc(100vh - var(--topbar-height) - 60px);
    display: flex;
    flex-direction: column;
}

.schedule-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    align-items: center;
}

.date-range-selector {
    display: flex;
    align-items: center;
}

.date-range-selector #date-range-display {
    font-size: 16px;
    font-weight: 500;
    margin: 0 12px;
    min-width: 180px;
    text-align: center;
}

.view-options {
    display: flex;
}

.view-options .btn {
    margin-left: 5px;
}

.view-options .btn.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Filter bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: var(--bg-color);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-select {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: white;
    min-width: 150px;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-container input {
    padding: 6px 10px;
    padding-right: 30px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    width: 200px;
}

.search-input-container .material-icons {
    position: absolute;
    right: 8px;
    color: var(--text-secondary);
    font-size: 18px;
}

.gantt-container {
    display: flex;
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.gantt-sidebar {
    width: 250px;
    border-right: 1px solid var(--border-color);
    background-color: var(--bg-color);
    overflow-y: auto;
}

.gantt-sidebar .sidebar-header {
    padding: 10px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

.gantt-task-item {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-height: 50px;
}

.gantt-group-header {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.gantt-group-header:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.gantt-group-title {
    font-weight: 500;
    display: flex;
    align-items: center;
}

.gantt-group-title .material-icons {
    margin-right: 5px;
    font-size: 18px;
    transition: transform 0.2s;
}

.gantt-group-title .material-icons.expanded {
    transform: rotate(90deg);
}

.gantt-group-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.gantt-group-count {
    background-color: var(--primary-light);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.gantt-group-tasks {
    display: none;
}

.gantt-group-tasks.expanded {
    display: block;
}

.task-item-title {
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-item-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.gantt-chart-container {
    flex: 1;
    overflow: auto;
    position: relative;
}

.gantt-timeline-header {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: var(--card-color);
    border-bottom: 1px solid var(--border-color);
}

.timeline-header-cell {
    flex: 1;
    min-width: 60px;
    text-align: center;
    padding: 10px 0;
    font-size: 12px;
    border-right: 1px solid var(--border-color);
}

.gantt-chart {
    position: relative;
}

.gantt-row {
    height: 50px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.gantt-group-row {
    border-bottom: 1px solid var(--border-color);
    position: relative;
    background-color: var(--bg-color);
}

.gantt-group-row-header {
    height: 40px;
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.gantt-group-row-tasks {
    display: none;
}

.gantt-group-row-tasks.expanded {
    display: block;
}

.gantt-task-bar {
    position: absolute;
    height: 24px;
    top: 13px;
    border-radius: 4px;
    cursor: move;
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: box-shadow 0.2s ease;
}

.gantt-task-bar:hover {
    box-shadow: 0 3px 6px rgba(0,0,0,0.16);
}

.gantt-task-bar.scheduled {
    background-color: var(--primary-color);
}

.gantt-task-bar.in-progress {
    background-color: var(--warning-color);
}

.gantt-task-bar.completed {
    background-color: var(--success-color);
}

.gantt-task-bar.delayed {
    background-color: var(--error-color);
}

.gantt-task-bar .task-dates {
    font-size: 10px;
    color: white;
    position: absolute;
    bottom: -18px;
    white-space: nowrap;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

.gantt-task-bar .actual-marker {
    position: absolute;
    right: 0;
    height: 100%;
    width: 3px;
    background-color: rgba(0,0,0,0.5);
}

.today-line {
    position: absolute;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: var(--error-color);
    z-index: 2;
}

.legend {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 5px;
}

.legend-color.scheduled {
    background-color: var(--primary-color);
}

.legend-color.in-progress {
    background-color: var(--warning-color);
}

.legend-color.completed {
    background-color: var(--success-color);
}

.legend-color.delayed {
    background-color: var(--error-color);
}

/* Task tooltip */
.task-tooltip {
    position: absolute;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 8px 12px;
    z-index: 10;
    min-width: 200px;
    display: none;
}

.task-tooltip.visible {
    display: block;
}

.tooltip-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.tooltip-detail {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

/* Dragging styles */
.gantt-task-bar.dragging {
    opacity: 0.8;
    z-index: 3;
}

/* Notification system */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
    max-width: 300px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.notification::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
    background-size: contain;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background-color: var(--success-color);
}

.notification.success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
}

.notification.error {
    background-color: var(--error-color);
}

.notification.error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
}

.notification.warning {
    background-color: var(--warning-color);
}

.notification.warning::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/%3E%3C/svg%3E");
}

/* Import/Export Functionality */
.view-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    gap: 10px;
}

.import-btn, .export-btn {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.import-btn:hover, .export-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.import-btn .material-icons, .export-btn .material-icons {
    margin-right: 8px;
    font-size: 18px;
}

.import-container {
    padding: 20px;
}

.import-options {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
}

.import-options h4 {
    margin-bottom: 15px;
    font-weight: 500;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px 15px 50px;
    background-color: var(--card-color);
    color: var(--text-primary);
    border-radius: 4px;
    box-shadow: var(--shadow-medium);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    max-width: 400px;
}

.notification::before {
    content: "info";
    font-family: "Material Icons";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.notification.success::before {
    content: "check_circle";
}

.notification.error {
    background-color: #ffebee;
    color: #c62828;
}

.notification.error::before {
    content: "error";
}

.notification.warning {
    background-color: #fff8e1;
    color: #f57f17;
}

.notification.warning::before {
    content: "warning";
}

.notification.info {
    background-color: #e3f2fd;
    color: #1565c0;
}

.notification.info::before {
    content: "info";
}

/* Export Format Selection */
.export-container {
    padding: 20px;
}

.export-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
}

.export-format-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 150px;
    padding: 20px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.export-format-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.export-format-btn .material-icons {
    font-size: 36px;
    margin-bottom: 10px;
}

.export-format-btn span:not(.material-icons) {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.format-description {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    margin: 5px 0 0 0;
}

/* Dropdown Menus */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--card-color);
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.dropdown-content a {
    color: var(--text-primary);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
    background-color: var(--hover-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown .btn {
    margin-bottom: 0;
}

/* Inventory System CSS */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tab-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-btn:hover:not(.active) {
    border-color: var(--border-color);
    color: var(--text-primary);
}

.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

.inventory-card {
    grid-column: span 2;
}

/* Inventory Item Styles */
.inventory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background-color: var(--card-color);
    border-radius: 4px;
    box-shadow: var(--shadow-light);
    transition: box-shadow 0.3s ease;
}

.inventory-item:hover {
    box-shadow: var(--shadow-medium);
}

.inventory-details {
    flex: 1;
}

.inventory-title {
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 5px;
}

.inventory-info {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

.inventory-info-item {
    display: flex;
    align-items: center;
}

.inventory-info-item .material-icons {
    font-size: 16px;
    margin-right: 5px;
}

.inventory-quantity {
    font-weight: bold;
    display: flex;
    align-items: center;
    padding: 5px 15px;
    border-radius: 4px;
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.inventory-actions {
    display: flex;
    gap: 10px;
}

/* Assembled Component Styles */
.assembled-component-item {
    border-left: 4px solid var(--primary-color);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-indicator.available {
    background-color: var(--success-color);
}

.status-indicator.low-stock {
    background-color: var(--warning-color);
}

.status-indicator.out-of-stock {
    background-color: var(--error-color);
}

/* Part Status Selection in Production Tasks */
.part-status-selector {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding: 15px;
    border-top: 1px solid var(--border-color);
}

.status-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.status-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-bottom: 5px;
    border: 2px solid var(--border-color);
}

.status-circle.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.3);
}

.status-circle.from-inventory {
    background-color: var(--success-color);
}

.status-circle.needs-production {
    background-color: var(--warning-color);
}

.status-circle.custom-source {
    background-color: var(--primary-color);
}

.inventory-source-form {
    margin-top: 15px;
    padding: 15px;
    background-color: var(--bg-color);
    border-radius: 4px;
}

/* Order Inventory Integration */
.order-inventory-section {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--primary-light);
    border-radius: 4px;
}

.order-inventory-section h4 {
    margin-bottom: 10px;
    font-weight: 500;
}

.inventory-toggle-switch {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
} 