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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: #f5f5f5;
            font-size: 14px;
            overflow-x: hidden;
        }

        /* Sidebar Styles */
        .sidebar {
            position: fixed;
            left: 0;
            top: 0;
            height: 100vh;
            width: 260px;
            background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
            box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
            display: flex;
            flex-direction: column;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 1000;
        }

        .sidebar.collapsed {
            width: 70px;
        }

        .sidebar.auto-hide:not(:hover) {
            width: 70px;
        }

        .sidebar-header {
            padding: 20px 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .sidebar-logo {
            display: flex;
            align-items: center;
            gap: 12px;
            overflow: hidden;
        }

        .logo-icon {
            font-size: 28px;
            min-width: 40px;
            text-align: center;
        }

        .logo-text {
            font-size: 18px;
            font-weight: 700;
            color: white;
            white-space: nowrap;
            transition: opacity 0.3s, transform 0.3s;
        }

        .sidebar.collapsed .logo-text,
        .sidebar.auto-hide:not(:hover) .logo-text {
            opacity: 0;
            transform: translateX(-10px);
        }

        .sidebar-settings-btn {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .sidebar-settings-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .sidebar.collapsed .sidebar-settings-btn,
        .sidebar.auto-hide:not(:hover) .sidebar-settings-btn {
            opacity: 0;
            pointer-events: none;
        }

        .sidebar-nav {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 10px 8px;
        }

        .sidebar-nav::-webkit-scrollbar {
            width: 6px;
        }

        .sidebar-nav::-webkit-scrollbar-track {
            background: transparent;
        }

        .sidebar-nav::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 3px;
        }

        .sidebar-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 12px;
            margin-bottom: 4px;
            background: none;
            border: none;
            border-radius: 8px;
            color: rgba(255, 255, 255, 0.7);
            cursor: pointer;
            transition: all 0.2s;
            width: 100%;
            text-align: left;
            overflow: hidden;
            position: relative;
        }

        .sidebar-item:hover {
            background: rgba(255, 255, 255, 0.1);
            color: white;
        }

        .sidebar-item.active {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            color: white;
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
        }

        .sidebar-icon {
            font-size: 20px;
            min-width: 24px;
            text-align: center;
        }

        .sidebar-label {
            font-size: 14px;
            font-weight: 500;
            white-space: nowrap;
            transition: opacity 0.3s, transform 0.3s;
        }

        .sidebar.collapsed .sidebar-label,
        .sidebar.auto-hide:not(:hover) .sidebar-label {
            opacity: 0;
            transform: translateX(-10px);
        }

        .sidebar-divider {
            height: 1px;
            background: rgba(255, 255, 255, 0.1);
            margin: 12px 8px;
        }

        .sidebar-section-label {
            padding: 12px 12px 8px 12px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: rgba(255, 255, 255, 0.4);
            overflow: hidden;
        }

        .sidebar-section-label span {
            transition: opacity 0.3s, transform 0.3s;
            display: inline-block;
        }

        .sidebar.collapsed .sidebar-section-label span,
        .sidebar.auto-hide:not(:hover) .sidebar-section-label span {
            opacity: 0;
            transform: translateX(-10px);
        }

        .sidebar-footer {
            padding: 15px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .sidebar-toggle-btn {
            width: 100%;
            padding: 10px;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            border-radius: 6px;
            color: white;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 16px;
        }

        .sidebar-toggle-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .toggle-icon {
            display: inline-block;
            transition: transform 0.3s;
        }

        .sidebar.collapsed .toggle-icon,
        .sidebar.auto-hide:not(:hover) .toggle-icon {
            transform: rotate(180deg);
        }

        /* Main Content Area */
        .main-content {
            margin-left: 260px;
            min-height: 100vh;
            transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            padding: 20px;
        }

        .sidebar.collapsed ~ .main-content,
        .sidebar.auto-hide:not(:hover) ~ .main-content {
            margin-left: 70px;
        }

        .container {
            max-width: 1800px;
            margin: 0 auto;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        /* Hide old tab navigation */
        .tabs {
            display: none;
        }

        .tab-content {
            display: none;
            padding: 30px;
        }

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

        h2 {
            margin-bottom: 20px;
            color: #333;
        }

        .library-grid {
            display: grid;
            gap: 15px;
            margin-bottom: 20px;
        }

        .library-item {
            border: 1px solid #e0e0e0;
            padding: 15px;
            border-radius: 6px;
            background: #fafafa;
            transition: all 0.2s;
        }

        .library-item:hover {
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .library-item h3 {
            margin-bottom: 10px;
            color: #2563eb;
            font-size: 16px;
        }

        .library-item-info {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 10px;
            font-size: 13px;
        }

        .library-item-info div {
            display: flex;
            justify-content: space-between;
        }

        .library-item-info label {
            color: #666;
            font-weight: 500;
        }

        .library-item-info span {
            color: #333;
            font-weight: 600;
        }

        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s;
        }

        .btn-primary {
            background: #2563eb;
            color: white;
        }

        .btn-primary:hover {
            background: #1d4ed8;
        }

        .btn-success {
            background: #059669;
            color: white;
        }

        .btn-success:hover {
            background: #047857;
        }

        .btn-danger {
            background: #dc2626;
            color: white;
            padding: 5px 10px;
            font-size: 12px;
        }

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

        .btn-zoom {
            background: #e5e7eb;
            color: #374151;
            padding: 8px 16px;
            font-size: 13px;
            margin-left: 5px;
        }

        .btn-zoom:hover {
            background: #d1d5db;
        }

        .btn-zoom.active {
            background: #2563eb;
            color: white;
        }

        .zoom-controls {
            display: flex;
            gap: 0;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 5px;
            color: #555;
            font-weight: 500;
        }

        .form-group input,
        .form-group select {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #d0d0d0;
            border-radius: 4px;
            font-size: 14px;
        }

        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 15px;
        }

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

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: white;
            padding: 30px;
            border-radius: 8px;
            max-width: 600px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
        }

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

        .modal-close {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #666;
        }

        .crops-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
            font-size: 13px;
        }

        .crops-table th,
        .crops-table td {
            padding: 10px;
            text-align: left;
            border-bottom: 1px solid #e0e0e0;
        }

        .crops-table th {
            background: #fafafa;
            font-weight: 600;
            color: #555;
            position: sticky;
            top: 0;
        }

        .crops-table tr:hover {
            background: #f9f9f9;
        }

        .crops-table input {
            width: 100%;
            padding: 4px 8px;
            border: 1px solid #d0d0d0;
            border-radius: 3px;
            font-size: 13px;
        }

        .crops-table select {
            width: 100%;
            padding: 4px 8px;
            border: 1px solid #d0d0d0;
            border-radius: 3px;
            font-size: 13px;
        }

        .gantt-container {
            overflow-x: auto;
            margin-top: 20px;
            border: 1px solid #e0e0e0;
            border-radius: 6px;
        }

        .gantt-header {
            display: flex;
            background: #fafafa;
            border-bottom: 2px solid #e0e0e0;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .gantt-row-label {
            width: 150px;
            padding: 10px;
            font-weight: 600;
            border-right: 2px solid #e0e0e0;
            background: #fafafa;
            flex-shrink: 0;
            position: relative;
        }

        .conflict-badge {
            position: absolute;
            top: 5px;
            right: 5px;
            background: #dc2626;
            color: white;
            border-radius: 12px;
            padding: 2px 8px;
            font-size: 11px;
            font-weight: 700;
        }

        .gantt-timeline {
            display: flex;
            flex: 1;
            position: relative;
        }

        .gantt-month {
            border-right: 1px solid #d0d0d0;
            text-align: center;
            padding: 10px 5px;
            font-weight: 600;
            font-size: 12px;
            color: #555;
        }

        .gantt-row {
            display: flex;
            border-bottom: 1px solid #e0e0e0;
            min-height: 50px;
            position: relative;
        }

        .gantt-row.has-conflicts {
            min-height: 100px;
        }

        .gantt-row:hover {
            background: #f9f9f9;
        }

        .gantt-bars-container {
            flex: 1;
            position: relative;
            padding: 5px 0;
        }

        .gantt-bar {
            position: absolute;
            height: 30px;
            border-radius: 4px;
            cursor: move;
            display: flex;
            align-items: center;
            padding: 0 8px;
            font-size: 11px;
            font-weight: 600;
            color: white;
            white-space: nowrap;
            overflow: hidden;
            transition: box-shadow 0.2s;
            top: 50%;
            transform: translateY(-50%);
        }

        .gantt-bar:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
            z-index: 5;
        }

        .gantt-tooltip {
            position: absolute;
            background: #1f2937;
            color: white;
            padding: 12px;
            border-radius: 6px;
            font-size: 12px;
            line-height: 1.6;
            pointer-events: none;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            white-space: nowrap;
            display: none;
        }

        .gantt-tooltip.active {
            display: block;
        }

        .gantt-tooltip-title {
            font-weight: 600;
            margin-bottom: 6px;
            padding-bottom: 6px;
            border-bottom: 1px solid rgba(255,255,255,0.2);
        }

        .gantt-tooltip-row {
            display: flex;
            justify-content: space-between;
            gap: 20px;
            margin-top: 4px;
        }

        .gantt-tooltip-label {
            color: #9ca3af;
        }

        .gantt-bar.dragging {
            opacity: 0.7;
            z-index: 100;
        }

        .gantt-bar.overlap {
            box-shadow: 0 0 0 3px #dc2626;
        }

        .gantt-bar.conflict {
            box-shadow: 0 0 0 3px #dc2626;
        }

        .stage-clone { background: #8b5cf6; }
        .stage-veg { background: #059669; }
        .stage-flower { background: #dc2626; }
        .stage-dry { background: #f59e0b; }

        .resize-handle {
            position: absolute;
            width: 10px;
            height: 100%;
            top: 0;
            cursor: ew-resize;
            z-index: 10;
        }

        .resize-handle.left {
            left: 0;
        }

        .resize-handle.right {
            right: 0;
        }

        .gantt-today-line {
            position: absolute;
            width: 2px;
            background: #2563eb;
            top: 0;
            bottom: 0;
            z-index: 5;
            pointer-events: none;
        }

        .gantt-blackout-line {
            position: absolute;
            background: repeating-linear-gradient(
                45deg,
                #dc2626,
                #dc2626 5px,
                #f87171 5px,
                #f87171 10px
            );
            top: 0;
            bottom: 0;
            z-index: 4;
            opacity: 0.4;
            cursor: help;
            border-left: 2px solid #dc2626;
            border-right: 2px solid #dc2626;
        }

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

        .stat-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }

        .stat-card h3 {
            font-size: 13px;
            opacity: 0.9;
            margin-bottom: 8px;
        }

        .stat-card .value {
            font-size: 28px;
            font-weight: 700;
        }

        .action-buttons {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }

        .library-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 10px;
        }

        .editable-cell {
            cursor: pointer;
            padding: 4px;
            border-radius: 3px;
        }

        .editable-cell:hover {
            background: #f0f0f0;
        }

        /* Calendar View Styles */
        .calendar-grid {
            width: 100%;
        }

        .calendar-day-header {
            background: #fafafa;
            padding: 12px;
            text-align: center;
            font-weight: 600;
            color: #555;
            font-size: 13px;
            border-bottom: 2px solid #e0e0e0;
        }

        .calendar-day {
            background: white;
            min-height: 120px;
            padding: 8px;
            position: relative;
            transition: background 0.2s;
        }

        .calendar-day:hover {
            background: #f9f9f9;
        }

        .calendar-day.empty {
            background: #fafafa;
        }

        .calendar-day.today {
            background: #eff6ff;
            border: 2px solid #2563eb;
        }

        .calendar-day.non-operational {
            background: #f3f4f6;
        }

        .calendar-day.non-operational:hover {
            background: #e5e7eb;
        }

        .calendar-day.today.non-operational {
            background: #dbeafe;
        }

        .calendar-day-number {
            font-weight: 600;
            font-size: 14px;
            color: #333;
            margin-bottom: 8px;
        }

        .calendar-events {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .calendar-event {
            padding: 4px 6px;
            border-radius: 4px;
            color: white;
            font-size: 11px;
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            cursor: pointer;
        }

        .calendar-legend-item:hover {
            background: #f3f4f6 !important;
        }

        .calendar-event:hover {
            opacity: 0.9;
        }

        /* Floating Action Buttons */
        .quick-note-floating-btn {
            position: fixed;
            bottom: 30px;
            right: 110px;
            width: 70px;
            height: 70px;
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            color: white;
            border: none;
            border-radius: 50%;
            font-size: 32px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
            transition: all 0.3s;
            z-index: 998;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .quick-note-floating-btn:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            transform: scale(1.1);
            box-shadow: 0 6px 16px rgba(37, 99, 235, 0.6);
        }

        .quick-note-floating-btn:active {
            transform: scale(0.95);
        }

        .bug-report-floating-btn {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: #dc2626;
            color: white;
            border: none;
            font-size: 28px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
            z-index: 999;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .bug-report-floating-btn:hover {
            background: #b91c1c;
            transform: scale(1.1);
            box-shadow: 0 6px 16px rgba(220, 38, 38, 0.6);
        }

        .bug-report-floating-btn:active {
            transform: scale(0.95);
        }

        textarea {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #d0d0d0;
            border-radius: 4px;
            font-size: 14px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            resize: vertical;
        }

        textarea:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        /* File Upload Styling */
        input[type="file"] {
            width: 100%;
            padding: 10px;
            border: 2px dashed #d0d0d0;
            border-radius: 8px;
            background: #f9fafb;
            cursor: pointer;
            transition: all 0.2s;
        }

        input[type="file"]:hover {
            border-color: #2563eb;
            background: #eff6ff;
        }

        .file-preview-card {
            position: relative;
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 8px;
            width: 120px;
            background: white;
            transition: transform 0.2s, box-shadow 0.2s;
        }

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

        .file-preview-card img {
            width: 100%;
            height: 80px;
            object-fit: cover;
            border-radius: 4px;
        }

        .file-preview-card p {
            margin: 5px 0 0 0;
            font-size: 11px;
            color: #666;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .file-preview-card button {
            position: absolute;
            top: 4px;
            right: 4px;
            background: #dc2626;
            color: white;
            border: none;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            cursor: pointer;
            font-size: 14px;
            line-height: 1;
            transition: background 0.2s;
        }

        .file-preview-card button:hover {
            background: #991b1b;
        }

        /* Responsive Sidebar */
        @media (max-width: 768px) {
            .sidebar {
                transform: translateX(-100%);
            }

            .sidebar.mobile-open {
                transform: translateX(0);
            }

            .main-content {
                margin-left: 0 !important;
            }

            .mobile-menu-btn {
                position: fixed;
                top: 20px;
                left: 20px;
                z-index: 999;
                background: #1e293b;
                color: white;
                border: none;
                width: 48px;
                height: 48px;
                border-radius: 12px;
                font-size: 24px;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            }

            .sidebar-overlay {
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.5);
                z-index: 999;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.3s;
            }

            .sidebar-overlay.active {
                opacity: 1;
                pointer-events: all;
            }
        }

        @media (min-width: 769px) {
            .mobile-menu-btn,
            .sidebar-overlay {
                display: none !important;
            }
        }

        /* Breadcrumb Navigation Styles */
        #breadcrumb {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
        }

        .breadcrumb-link {
            color: #9ca3af;
            text-decoration: none;
            transition: color 0.2s;
            font-size: 14px;
        }

        .breadcrumb-link:hover {
            color: #60a5fa;
        }

        .breadcrumb-separator {
            color: #6b7280;
            margin: 0 8px;
            user-select: none;
        }

        .breadcrumb-current {
            color: #ffffff;
            font-weight: 600;
            font-size: 14px;
        }

        @media (max-width: 768px) {
            #breadcrumb {
                font-size: 12px;
            }

            .breadcrumb-link,
            .breadcrumb-current {
                font-size: 12px;
            }

            .breadcrumb-separator {
                margin: 0 4px;
            }
        }

/* Propagation Success Notification Animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Gantt Chart Controls */
.btn-zoom, .btn-color-mode {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-zoom:hover, .btn-color-mode:hover {
    background: #f3f4f6;
}

.btn-zoom.active, .btn-color-mode.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}
