body {
    font-family: 'Inter', sans-serif;
    background-color: #111827;
    color: #e5e7eb;
}

.glass-card {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(75, 85, 99, 0.5);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}

.nav-btn {
    transition: background-color 0.2s, color 0.2s;
}

.nav-btn.active {
    background-color: rgba(75, 85, 99, 0.3);
    font-weight: 600;
    border-left: 4px solid #3b82f6;
}

.tab-content { display: none; }
.tab-content.active { display: flex; } /* Changed to flex for consistency */
.btn-primary { background-color: #3b82f6; color: white; }
.btn-primary:hover { background-color: #2563eb; }
.btn-green { background-color: #10b981; color: white; }
.btn-green:hover { background-color: #059669; }
.btn-orange { background-color: #f59e0b; color: white; }
.btn-orange:hover { background-color: #d97706; }
.btn-red { background-color: #ef4444; color: white; }
.btn-red:hover { background-color: #dc2626; }

.progress-bar {
    height: 8px;
    border-radius: 4px;
    background-color: rgba(75, 85, 99, 0.7);
    overflow: hidden;
}

.progress-bar-fill { height: 100%; border-radius: 4px; }

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

th { background-color: rgba(55, 65, 81, 0.5); color: #d1d5db; }
tr:nth-child(even) { background-color: rgba(55, 65, 81, 0.2); }

.drag-drop-zone {
    border: 2px dashed rgba(107, 114, 128, 0.5);
    padding: 20px; text-align: center; cursor: pointer;
    transition: background-color 0.3s;
}

.drag-drop-zone.dragover { background-color: rgba(75, 85, 99, 0.4); }

.modal-input, .schedule-input, .memo-input {
     color: white;
     background-color: rgba(55, 65, 81, 0.7);
     border: 1px solid #4b5563;
}

.modal-input::placeholder, .schedule-input::placeholder, .memo-input::placeholder { color: #9ca3af; }

.modal-input:focus, .schedule-input:focus, .memo-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6; 
    border-color: #3b82f6;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Schedule Tab Specific Styles */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-day { min-height: 120px; background-color: rgba(55, 65, 81, 0.2); transition: background-color 0.2s; cursor: pointer; }
.calendar-day:hover { background-color: rgba(55, 65, 81, 0.4); }
.calendar-day.other-month { background-color: rgba(31, 41, 55, 0.3); color: #6b7280; cursor: default; }
.calendar-day.today { background-color: rgba(59, 130, 246, 0.3); border: 1px solid #3b82f6; }
.calendar-day.selected { background-color: rgba(59, 130, 246, 0.4); border: 2px solid #60a5fa; }
.calendar-task { font-size: 0.75rem; padding: 2px 4px; margin-top: 4px; border-radius: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-task.completed { text-decoration: line-through; opacity: 0.6; background-color: #10b981 !important; }
.schedule-task-detail input, .schedule-task-detail textarea, .schedule-task-detail select { width: 100%; padding: 8px; border-radius: 6px; }

/* Memo Tab Specific Styles */
#memo-board-container { overflow: hidden; position: relative; background-color: #1f2937; cursor: grab; }
#memo-board-container:active { cursor: grabbing; }
#memo-board { position: relative; width: 3000px; height: 2000px; transform-origin: 0 0; }
.memo-grid { background-image: linear-gradient(rgba(75, 85, 99, 0.3) 1px, transparent 1px), linear-gradient(90deg, rgba(75, 85, 99, 0.3) 1px, transparent 1px); background-size: 20px 20px; }
.memo-note { position: absolute; box-shadow: 0 4px 8px rgba(0,0,0,0.3); border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; }
.memo-note.selected { border: 2px solid #3b82f6; box-shadow: 0 0 15px rgba(59, 130, 246, 0.5); }
.memo-header { cursor: move; padding: 4px 8px; display: flex; justify-content: flex-end; align-items: center; background-color: rgba(0,0,0,0.2); border-top-left-radius: 8px; border-top-right-radius: 8px; height: 28px; }
.memo-content { padding: 8px; flex-grow: 1; overflow-y: auto; color: #111827}
.memo-content[contenteditable="true"]:focus { outline: none; }
.memo-content img { max-width: 100%; height: auto; border-radius: 4px; }
.memo-content ul, .memo-content ol { margin-left: 1.5rem; }
.memo-content h1, .memo-content h2, .memo-content h3 { font-weight: bold; margin-bottom: 0.5rem; }
.memo-content h1 { font-size: 1.5em; } .memo-content h2 { font-size: 1.25em; } .memo-content h3 { font-size: 1.1em; }
.resizer { position: absolute; width: 12px; height: 12px; background: #3b82f6; border: 2px solid white; border-radius: 50%; }
.resizer.bottom-right { bottom: -6px; right: -6px; cursor: nwse-resize; z-index: 10; }
.rotater { position: absolute; top: -25px; left: 50%; transform: translateX(-50%); width: 16px; height: 16px; background: #f59e0b; border-radius: 50%; cursor: crosshair; z-index: 10; }
.selection-marquee { position: absolute; border: 1px dashed #3b82f6; background-color: rgba(59, 130, 246, 0.2); z-index: 9999; }
.memo-toolbar-btn { transition: background-color 0.2s; }
.memo-toolbar-btn.active { background-color: #3b82f6 !important; }

@media print { body * { visibility: hidden; } #memo-board-container, #memo-board, #memo-board * { visibility: visible; } #memo-board-container { position: absolute; left: 0; top: 0; } .memo-note { box-shadow: none; border: 1px solid #ccc; } }

/* A/S Tab Specific Styles */
.as-sub-nav-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s, color 0.2s;
    border-bottom: 3px solid transparent;
}
.as-sub-nav-btn.active {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-bottom-color: #3b82f6;
}
.as-sub-tab-content { display: none; }
.as-sub-tab-content.active { display: block; }

/* Production Schedule Module (PSM) Specific Styles */
.psm-table-container { max-height: 60vh; }
#psm-table { table-layout: fixed; width: 100%; }
#psm-table th { position: sticky; top: 0; z-index: 10; background-color: rgba(55, 65, 81, 0.8); backdrop-filter: blur(5px); }
.psm-scrollbar-custom::-webkit-scrollbar { width: 12px; height: 12px; }
.psm-scrollbar-custom::-webkit-scrollbar-thumb { background-color: #4b5563; border-radius: 6px; border: 2px solid #1f2937; }
.psm-scrollbar-custom::-webkit-scrollbar-track { background-color: #374151; }
.psm-wide-column { width: 350px; min-width: 350px; word-break: break-word; white-space: normal !important; }
.psm-medium-column { width: 250px; min-width: 250px; word-break: break-word; white-space: normal !important; }
.psm-default-column { white-space: nowrap; min-width: 150px; width: 150px; }
.psm-interaction-disabled { opacity: 0.5; pointer-events: none; }

/* Loading spinner */
.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #3b82f6;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}