/* Custom Styles for OPTIGovt - Light Theme */

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 179, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 179, 0.7);
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.8);
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.5);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, 0.7);
}

/* Glassmorphism Effect - Light Theme */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Override dark theme classes for light mode */
.bg-dark-950 {
    background-color: #f8fafc !important;
}

.bg-dark-900\/50 {
    background: rgba(255, 255, 255, 0.8) !important;
}

.bg-dark-900\/30 {
    background: rgba(255, 255, 255, 0.6) !important;
}

.bg-dark-800 {
    background-color: #ffffff !important;
}

.bg-dark-800\/50 {
    background: rgba(255, 255, 255, 0.8) !important;
}

.bg-dark-700\/50 {
    background: rgba(241, 245, 249, 0.8) !important;
}

.bg-dark-700 {
    background-color: #e2e8f0 !important;
}

.text-dark-100 {
    color: #0f172a !important;
}

.text-dark-300 {
    color: #334155 !important;
}

.text-dark-400 {
    color: #475569 !important;
}

.text-dark-500 {
    color: #64748b !important;
}

.border-dark-700\/50 {
    border-color: rgba(203, 213, 225, 0.8) !important;
}

.border-dark-700\/30 {
    border-color: rgba(203, 213, 225, 0.5) !important;
}

.border-dark-600\/50 {
    border-color: rgba(203, 213, 225, 0.8) !important;
}

.placeholder-dark-500::placeholder {
    color: #94a3b8 !important;
}

/* Dark mode body background */
html.dark body {
    background-color: #0f172a;
    color: #f1f5f9;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.2s ease-out;
}

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

/* Kanban Column - Light Theme */
.kanban-column {
    min-width: 320px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 1rem;
    height: 100%;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.kanban-column-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(248, 250, 252, 0.8);
}

.kanban-column-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(248, 250, 252, 0.5);
}

.kanban-column.drag-over {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.5);
}

/* Dark mode kanban */
.dark .kanban-column {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(51, 65, 85, 0.8);
}

.dark .kanban-column-header {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(51, 65, 85, 0.8);
}

.dark .kanban-column-content {
    background: rgba(15, 23, 42, 0.5);
}

/* Dark mode welcome screen */
.dark #welcomeScreen > div:first-child {
    background: #1e293b !important;
}

/* Task Card - Light Theme */
.task-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 0.75rem;
    padding: 1rem;
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Dark mode task card */
.dark .task-card {
    background: #1e293b;
    border-color: rgba(51, 65, 85, 0.8);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dark .task-card:hover {
    background: #1e293b;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.task-card:hover {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.task-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
    transform: rotate(3deg);
}

.task-card-placeholder {
    background: rgba(99, 102, 241, 0.05);
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 0.75rem;
    min-height: 80px;
}

/* Task Locked State - Task dengan dependensi yang belum selesai */
.task-locked {
    background: #fef2f2;
    border-color: rgba(239, 68, 68, 0.3);
    cursor: not-allowed !important;
}

/* Dark mode task locked */
.dark .task-locked {
    background: rgba(127, 29, 29, 0.3);
    border-color: rgba(239, 68, 68, 0.4);
}

.task-locked:hover {
    background: #fef2f2;
    border-color: rgba(239, 68, 68, 0.5);
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.task-locked .task-card-title {
    opacity: 0.7;
}

/* Priority Badges */
.priority-low {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.priority-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.priority-high {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.priority-urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
    animation: pulse-glow 2s infinite;
}

/* Progress Bar - Light Theme */
.progress-bar {
    height: 4px;
    background: rgba(226, 232, 240, 0.8);
    border-radius: 2px;
    overflow: hidden;
}

/* Dark mode progress bar */
.dark .progress-bar {
    background: rgba(51, 65, 85, 0.8);
}

.progress-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Gantt Chart - Light Theme */
.gantt-container {
    position: relative;
}

.gantt-header {
    display: flex;
    background: rgba(248, 250, 252, 0.9);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 10;
}

.gantt-header-cell {
    min-width: 40px;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    border-right: 1px solid rgba(226, 232, 240, 0.5);
}

.gantt-header-cell.weekend {
    background: rgba(99, 102, 241, 0.03);
}

.gantt-header-cell.today {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    font-weight: 600;
}

.gantt-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    min-height: 50px;
}

.gantt-task-info {
    min-width: 250px;
    max-width: 250px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-right: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    left: 0;
    z-index: 5;
}

.gantt-task-bar-container {
    flex: 1;
    display: flex;
    position: relative;
    min-height: 50px;
}

.gantt-grid-cell {
    min-width: 40px;
    border-right: 1px solid rgba(226, 232, 240, 0.3);
}

.gantt-grid-cell.weekend {
    background: rgba(99, 102, 241, 0.02);
}

.gantt-grid-cell.today {
    background: rgba(99, 102, 241, 0.08);
}

.gantt-task-bar {
    position: absolute;
    height: 28px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    white-space: nowrap;
}

.gantt-task-bar:hover {
    transform: translateY(-50%) scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.gantt-task-bar-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 6px 0 0 6px;
}

.gantt-task-bar-text {
    position: relative;
    z-index: 1;
}

/* Dark mode Gantt Chart */
.dark .gantt-header {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(51, 65, 85, 0.8);
}

.dark .gantt-header-cell {
    color: #94a3b8;
    border-color: rgba(51, 65, 85, 0.5);
}

.dark .gantt-header-cell.weekend {
    background: rgba(99, 102, 241, 0.08);
}

.dark .gantt-header-cell.today {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.dark .gantt-row {
    border-color: rgba(51, 65, 85, 0.5);
}

.dark .gantt-task-info {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(51, 65, 85, 0.8);
}

.dark .gantt-grid-cell {
    border-color: rgba(51, 65, 85, 0.3);
}

.dark .gantt-grid-cell.weekend {
    background: rgba(99, 102, 241, 0.05);
}

/* Gantt Dependency Arrows */
.gantt-dependency-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
    overflow: visible;
}

.gantt-dep-arrow {
    transition: opacity 0.2s ease;
}

.gantt-task-bar:hover ~ .gantt-dependency-svg .gantt-dep-arrow {
    opacity: 0.3;
}

/* Project Item in Sidebar - Clean Theme */
.project-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.project-item:hover {
    background: rgba(241, 245, 249, 0.8);
}

.project-item.active {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.15);
}

.project-item-color {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Dark mode project item */
.dark .project-item:hover {
    background: rgba(51, 65, 85, 0.5);
}

.dark .project-item.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

/* Add Column Button - Light Theme */
.add-column-btn {
    min-width: 280px;
    max-width: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(248, 250, 252, 0.5);
    border: 2px dashed rgba(203, 213, 225, 0.8);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #94a3b8;
}

.add-column-btn:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.4);
    color: #6366f1;
}

/* Dark mode add column button */
.dark .add-column-btn {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(51, 65, 85, 0.8);
    color: #64748b;
}

.dark .add-column-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.6);
}

/* Toast Styles - Light Theme */
.toast-success #toastIcon {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.toast-error #toastIcon {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* Dark mode toast */
.dark .toast-success #toastIcon {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.dark .toast-error #toastIcon {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

/* Modal Overlay - Light Theme */
.bg-dark-950\/80 {
    background: rgba(15, 23, 42, 0.5) !important;
}

/* Dark mode modal overlay */
.dark .bg-dark-950\/80 {
    background: rgba(0, 0, 0, 0.7) !important;
}

/* Dark mode task modal */
.dark #taskModal .bg-white {
    background: #1e293b !important;
}

.dark #taskModal .bg-slate-950\/60 {
    background: rgba(0, 0, 0, 0.7) !important;
}

/* Dark mode text colors in modals */
.dark #taskModal .text-slate-500 {
    color: #94a3b8 !important;
}

.dark #taskModal .text-slate-600 {
    color: #cbd5e1 !important;
}

.dark #taskModal .text-slate-700 {
    color: #e2e8f0 !important;
}

.dark #taskModal .text-slate-800 {
    color: #f1f5f9 !important;
}

.dark #taskModal .bg-slate-50 {
    background: #1e293b !important;
}

.dark #taskModal .bg-violet-100 {
    background: rgba(139, 92, 246, 0.2) !important;
}

.dark #taskModal .text-violet-600 {
    color: #a78bfa !important;
}

.dark #taskModal .bg-emerald-100 {
    background: rgba(16, 185, 129, 0.2) !important;
}

.dark #taskModal .text-emerald-600 {
    color: #34d399 !important;
}

.dark #taskModal .bg-amber-100 {
    background: rgba(245, 158, 11, 0.2) !important;
}

.dark #taskModal .text-amber-600 {
    color: #fbbf24 !important;
}

.dark #taskModal .bg-rose-100 {
    background: rgba(244, 63, 94, 0.2) !important;
}

.dark #taskModal .text-rose-600 {
    color: #fb7185 !important;
}

.dark #taskModal .border-slate-200,
.dark #taskModal .border-slate-100 {
    border-color: rgba(51, 65, 85, 0.8) !important;
}

/* Dark mode project modal */
.dark #projectModal .bg-white {
    background: #1e293b !important;
}

.dark #projectModal .bg-slate-950\/60 {
    background: rgba(0, 0, 0, 0.7) !important;
}

/* Dark mode task view modal */
.dark #taskViewModal .bg-white {
    background: #1e293b !important;
}

.dark #taskViewModal .bg-slate-950\/60 {
    background: rgba(0, 0, 0, 0.7) !important;
}

.dark #taskViewModal .text-slate-500 {
    color: #94a3b8 !important;
}

.dark #taskViewModal .text-slate-600 {
    color: #cbd5e1 !important;
}

.dark #taskViewModal .text-slate-700 {
    color: #e2e8f0 !important;
}

.dark #taskViewModal .text-slate-800 {
    color: #f1f5f9 !important;
}

.dark #taskViewModal .bg-slate-50 {
    background: #1e293b !important;
}

.dark #taskViewModal .bg-violet-100 {
    background: rgba(139, 92, 246, 0.2) !important;
}

.dark #taskViewModal .text-violet-600 {
    color: #a78bfa !important;
}

.dark #taskViewModal .bg-emerald-100 {
    background: rgba(16, 185, 129, 0.2) !important;
}

.dark #taskViewModal .text-emerald-600 {
    color: #34d399 !important;
}

.dark #taskViewModal .bg-amber-100 {
    background: rgba(245, 158, 11, 0.2) !important;
}

.dark #taskViewModal .text-amber-600 {
    color: #fbbf24 !important;
}

.dark #taskViewModal .bg-rose-100 {
    background: rgba(244, 63, 94, 0.2) !important;
}

.dark #taskViewModal .text-rose-600 {
    color: #fb7185 !important;
}

.dark #taskViewModal .border-slate-200,
.dark #taskViewModal .border-slate-100 {
    border-color: rgba(51, 65, 85, 0.8) !important;
}

/* Input/Form Styling for Light Theme */
.bg-dark-900\/50 {
    background: rgba(248, 250, 252, 0.8) !important;
}

/* Dark mode form backgrounds */
.dark input,
.dark select,
.dark textarea {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: #64748b !important;
}

.dark input:focus,
.dark select:focus,
.dark textarea:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

/* Select dropdown options */
select option {
    background: #ffffff;
    color: #0f172a;
}

.dark select option {
    background: #1e293b;
    color: #f1f5f9;
}

/* Toast Container - Light Theme */
#toast>div {
    background: #ffffff !important;
    border-color: rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Dark mode toast */
.dark #toast>div {
    background: #1e293b !important;
    border-color: rgba(51, 65, 85, 0.8) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Date picker icon fix for light theme */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none;
}

/* Dark mode date picker */
.dark input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* ======================================
   RESPONSIVE DESIGN
   ====================================== */

/* --- Sidebar Overlay --- */
#sidebarOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 39;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#sidebarOverlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* --- Tablet & small desktop (≤1024px) --- */
@media (max-width: 1024px) {
    #sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
        width: 288px;
    }

    #sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
    }

    .kanban-column {
        min-width: 280px;
        max-width: 280px;
    }
}

/* --- Mobile (≤768px) --- */
@media (max-width: 768px) {
    /* Header */
    header {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        height: 3.5rem !important;
    }

    header .min-w-0 {
        max-width: 45vw !important;
    }

    #currentProjectName {
        font-size: 0.875rem !important;
    }

    #currentProjectDesc {
        display: none !important;
    }

    /* View Toggle compact */
    #viewToggle {
        padding: 0.125rem !important;
    }

    #viewToggle button {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.6875rem !important;
    }

    /* Admin nav compact */
    #adminNav {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.6875rem !important;
    }

    /* Calendar button compact */
    #projectCalendarBtn {
        padding: 0.375rem 0.5rem !important;
        font-size: 0.75rem !important;
    }

    /* Kanban */
    .kanban-column {
        min-width: 260px !important;
        max-width: 260px !important;
    }

    #kanbanView {
        padding: 0.75rem !important;
    }

    #kanbanBoard {
        gap: 0.75rem !important;
    }

    /* Task card */
    .task-card {
        padding: 0.75rem;
    }

    /* Welcome screen */
    #welcomeScreen {
        padding: 1rem !important;
    }

    #welcomeScreen > div:first-child {
        width: 4rem !important;
        height: 4rem !important;
        margin-bottom: 0.75rem !important;
    }

    #welcomeScreen h3 {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }

    #welcomeScreen p {
        font-size: 0.75rem !important;
        margin-bottom: 1rem !important;
    }

    #welcomeScreen button {
        padding: 0.5rem 1rem !important;
        font-size: 0.8125rem !important;
    }

    /* Modals */
    #projectModalContent,
    #taskModalContent,
    #aiGenerationModalContent {
        max-width: 95vw !important;
        margin: 0.5rem;
    }

    #projectModal .p-6,
    #taskModal .p-6,
    #projectForm,
    #taskForm {
        padding: 1rem !important;
    }

    /* Form grids go single-column */
    #projectForm .grid-cols-2,
    #taskForm .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    /* Gantt views */
    #ganttView, #allGanttView {
        padding: 0.75rem !important;
    }

    .gantt-task-info {
        min-width: 160px;
        max-width: 160px;
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
    }

    /* Toast */
    #toast {
        left: 1rem !important;
        right: 1rem !important;
        bottom: 1rem !important;
    }

    #toast > div {
        width: 100%;
    }

    /* Calendar dropdown */
    #projectCalendarDropdown {
        right: 0.5rem !important;
        left: 0.5rem !important;
        min-width: auto !important;
    }
}

/* --- Small phones (≤480px) --- */
@media (max-width: 480px) {
    /* Sidebar full width */
    #sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Header extra compact */
    header {
        height: 3rem !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    header .min-w-0 {
        max-width: 40vw !important;
    }

    #currentProjectName {
        font-size: 0.8125rem !important;
    }

    /* View toggle — icon only */
    #viewToggle button span,
    #viewToggle button .hidden {
        display: none !important;
    }

    #viewToggle button {
        padding: 0.25rem !important;
    }

    /* Admin nav — icon only */
    #adminNav span {
        display: none;
    }

    #adminNav {
        padding: 0.25rem !important;
    }

    /* Kanban smaller columns */
    .kanban-column {
        min-width: 240px !important;
        max-width: 240px !important;
    }

    .kanban-column-header {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }

    .kanban-column-content {
        padding: 0.5rem;
    }

    /* Task card tighter */
    .task-card {
        padding: 0.625rem;
        font-size: 0.8125rem;
    }

    /* Welcome screen smaller */
    #welcomeScreen > div:first-child {
        width: 3.5rem !important;
        height: 3.5rem !important;
    }

    #welcomeScreen h3 {
        font-size: 0.875rem !important;
    }

    #welcomeScreen p {
        font-size: 0.6875rem !important;
    }

    /* Modal even tighter */
    #projectModal .p-6,
    #taskModal .p-6,
    #projectForm,
    #taskForm {
        padding: 0.75rem !important;
    }

    /* Gantt task info tighter */
    .gantt-task-info {
        min-width: 120px;
        max-width: 120px;
        padding: 0.375rem 0.5rem;
        font-size: 0.6875rem;
    }

    .gantt-header-cell {
        min-width: 30px;
        padding: 0.375rem;
        font-size: 0.625rem;
    }

    .gantt-grid-cell {
        min-width: 30px;
    }
}

/* Prevent horizontal overflow on mobile */
html, body {
    overflow-x: hidden;
}
/* PIC Badge & Avatar Styles */
.pic-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
    border: 1.5px solid white;
}

.pic-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(241, 245, 249, 0.8);
    padding: 2px 8px 2px 2px;
    border-radius: 9999px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    max-width: 140px;
    transition: all 0.2s ease;
}

.pic-badge:hover {
    background: rgba(241, 245, 249, 1);
    border-color: rgba(99, 102, 241, 0.3);
}

.pic-name {
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dark mode adjustments for PIC */
.dark .pic-badge {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(51, 65, 85, 0.8);
}

.dark .pic-name {
    color: #94a3b8;
}

.dark .pic-avatar {
    border-color: #1e293b;
}

/* Gantt specific neatness */
.gantt-task-pic-container {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

/* Gantt Row Locked State */
.gantt-row.bg-red-50\/30 {
    background: rgba(254, 242, 242, 0.3);
}

.dark .gantt-row.bg-red-50\/30 {
    background: rgba(127, 29, 29, 0.1);
}

/* Dependency Selection Styles */
#dependencySelection {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 179, 0.5) transparent;
}

#dependencySelection::-webkit-scrollbar {
    width: 4px;
}

#dependencySelection::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 179, 0.5);
    border-radius: 2px;
}

/* Task Dependencies Indicator */
.task-dependencies-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.task-dependencies-indicator.completed {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.task-dependencies-indicator.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.task-dependencies-indicator.locked {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* Line clamp utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ======================================
   CALENDAR VIEW STYLES
   ====================================== */

/* Calendar Container */
.cal-container {
    border-radius: 1rem;
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

.cal-theme-light .cal-container,
.cal-theme-light {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.cal-theme-dark .cal-container,
.cal-theme-dark {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Calendar Header */
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: #2563eb;
    color: white;
    gap: 1rem;
    flex-wrap: wrap;
}

.cal-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cal-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.cal-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cal-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(8px);
}

.cal-stat-icon {
    width: 0.875rem;
    height: 0.875rem;
}

.cal-stat-total {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
}

.cal-stat-today {
    background: rgba(16, 185, 129, 0.3);
    color: rgba(255, 255, 255, 0.95);
}

.cal-stat-urgent {
    background: rgba(239, 68, 68, 0.3);
    color: rgba(255, 255, 255, 0.95);
}

/* Calendar Navigation */
.cal-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cal-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.cal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.cal-today-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.cal-today-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.03);
}

/* Day Names Header */
.cal-day-names {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.cal-day-name {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cal-weekend-label {
    color: #6366f1;
}

/* Calendar Grid */
.cal-grid {
    background: #ffffff;
}

.cal-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal-cell {
    min-height: 110px;
    padding: 0.375rem;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    transition: background 0.15s ease;
    cursor: default;
    overflow: hidden;
}

.cal-cell:nth-child(7n) {
    border-right: none;
}

.cal-cell:hover {
    background: rgba(99, 102, 241, 0.02);
}

.cal-other-month {
    background: #fafbfc;
}

.cal-other-month .cal-date-number {
    color: #cbd5e1;
}

.cal-today {
    background: rgba(99, 102, 241, 0.04) !important;
}

.cal-weekend {
    background: rgba(241, 245, 249, 0.5);
}

/* Date Number */
.cal-date-number {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    padding: 0.125rem 0.375rem;
    margin-bottom: 0.25rem;
    display: inline-block;
}

.cal-date-today {
    background: #2563eb;
    color: white !important;
    border-radius: 0.5rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Calendar Events */
.cal-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cal-event {
    padding: 2px 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    position: relative;
}

.cal-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    z-index: 5;
}

.cal-event-text {
    position: relative;
    z-index: 1;
}

.cal-event-cont {
    opacity: 0.8;
}

/* Event positioning for multi-day */
.cal-event-start {
    border-radius: 4px 0 0 4px;
    margin-right: -2px;
}

.cal-event-end {
    border-radius: 0 4px 4px 0;
    margin-left: -2px;
}

.cal-event-middle {
    border-radius: 0;
    margin-left: -2px;
    margin-right: -2px;
}

.cal-event-single {
    border-radius: 4px;
}

/* Priority Colors */
.cal-priority-low {
    background: #10b981;
    color: white;
}

.cal-priority-medium {
    background: #2563eb;
    color: white;
}

.cal-priority-high {
    background: #f59e0b;
    color: white;
}

.cal-priority-urgent {
    background: #ef4444;
    color: white;
    animation: cal-urgent-pulse 2s ease-in-out infinite;
}

@keyframes cal-urgent-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
}

/* Priority dots for day modal */
.cal-priority-dot-low {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
}

.cal-priority-dot-medium {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6366f1;
    flex-shrink: 0;
}

.cal-priority-dot-high {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    flex-shrink: 0;
}

.cal-priority-dot-urgent {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
    animation: cal-urgent-pulse 2s ease-in-out infinite;
}

/* More events link */
.cal-more-events {
    padding: 2px 6px;
    font-size: 0.625rem;
    font-weight: 600;
    color: #6366f1;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.cal-more-events:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Tooltip */
.cal-tooltip {
    position: fixed;
    z-index: 1000;
    padding: 0.75rem 1rem;
    background: #1e293b;
    color: white;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.5;
    max-width: 280px;
    pointer-events: none;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.cal-tooltip.hidden {
    display: none;
}

/* Day Detail Modal */
.cal-day-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-day-modal.hidden {
    display: none;
}

.cal-day-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.cal-day-modal-content {
    position: relative;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    margin: 1rem;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.2s ease-out;
}

.cal-day-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.cal-day-modal-header h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
}

.cal-day-modal-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s;
}

.cal-day-modal-close:hover {
    background: #f1f5f9;
    color: #475569;
}

.cal-day-modal-body {
    padding: 1rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cal-empty-day {
    text-align: center;
    color: #94a3b8;
    padding: 2rem 0;
    font-size: 0.875rem;
}

/* Day Modal Task Cards */
.cal-day-task {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.cal-day-task:hover {
    border-color: var(--project-color, #6366f1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

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

.cal-day-task-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

.cal-day-task-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.cal-day-task-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cal-day-task-dates {
    font-size: 0.6875rem;
    color: #94a3b8;
}

.cal-day-task-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.cal-day-task-progress-bar {
    width: 60px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.cal-day-task-progress-bar::after {
    content: '';
    display: none;
}

.cal-day-task-progress-bar {
    background: #e2e8f0;
}

.cal-day-task-progress-bar > div,
div.cal-day-task-progress-bar {
    height: 4px;
    background: #2563eb;
    border-radius: 2px;
}

.cal-day-task-progress-text {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #6366f1;
}

/* Calendar Responsive */
@media (max-width: 768px) {
    .cal-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .cal-title {
        font-size: 1.25rem;
    }

    .cal-cell {
        min-height: 70px;
        padding: 0.25rem;
    }

    .cal-date-number {
        font-size: 0.6875rem;
    }

    .cal-event {
        font-size: 0.5625rem;
        padding: 1px 4px;
    }

    .cal-day-name {
        padding: 0.5rem 0.25rem;
        font-size: 0.625rem;
    }
}

@media (max-width: 480px) {
    .cal-cell {
        min-height: 55px;
    }

    .cal-event-text {
        display: none;
    }

    .cal-event {
        min-height: 4px;
        padding: 2px;
    }

    .cal-stats {
        display: none;
    }
}

/* ========================================
   MODERN TASK MODAL STYLES
   ======================================== */

/* Modal Animation */
#taskModalContent {
    will-change: transform, opacity;
}

#taskModalContent.modal-enter {
    animation: modalEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#taskModalContent.modal-exit {
    animation: modalExit 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

/* Input Focus Effects */
#taskForm input:focus,
#taskForm textarea:focus,
#taskForm select:focus {
    transform: translateY(-1px);
}

/* Drag and Drop Zone */
#taskForm .drag-over {
    background: rgba(99, 102, 241, 0.1) !important;
    border-color: #6366f1 !important;
    transform: scale(1.01);
}

/* File Attachment Items */
.attachment-item {
    animation: slideInAttachment 0.25s ease-out;
}

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

/* Dependency Items */
.dependency-item {
    animation: slideInDependency 0.2s ease-out;
}

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

/* PIC Selection Checkbox */
.pic-checkbox-item {
    transition: all 0.2s ease;
}

.pic-checkbox-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

.pic-checkbox-item.selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Star Button for Leader Selection */
.star-btn {
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.star-btn:hover {
    transform: scale(1.15);
}

.star-btn.active {
    color: #f59e0b;
    transform: scale(1.1);
}

.star-btn.active:hover {
    transform: scale(1.2);
}

/* Progress Bar Animation */
#taskProgressBarHeader {
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Section Card Hover Effects */
#taskForm .bg-white.rounded-2xl {
    transition: all 0.2s ease;
}

#taskForm .bg-white.rounded-2xl:hover {
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.08);
}

/* Button Hover Effects */
#taskForm button[type="submit"]:hover {
    transform: translateY(-1px);
}

#taskForm button[type="submit"]:active {
    transform: translateY(0);
}

/* Custom Scrollbar for Modal */
#taskForm .overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

#taskForm .overflow-y-auto::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
}

#taskForm .overflow-y-auto::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 3px;
}

#taskForm .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

/* Priority Select Options Styling */
#taskPriority option {
    padding: 8px 12px;
    font-size: 14px;
}

/* Selected Files Animation */
.selected-file-item {
    animation: slideInFile 0.2s ease-out;
}

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

/* Responsive Adjustments */
@media (max-width: 640px) {
    #taskModalContent {
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    #taskModalContent .px-8 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #taskModalContent .p-6 {
        padding: 1rem;
    }
    
    #taskModalContent .grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

/* Empty State Icons */
.empty-state-icon {
    opacity: 0.4;
    filter: grayscale(0.5);
}

/* Delete Button Pulse */
#deleteTaskBtn:hover {
    animation: deletePulse 0.5s ease;
}

@keyframes deletePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* ======================================
   MODERN DASHBOARD STYLES - CLEAN MINIMAL
   ====================================== */

/* Modern Project List Item */
.project-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: 1px solid transparent;
    position: relative;
}

.project-item:hover {
    background: rgba(241, 245, 249, 0.8);
}

.project-item.active {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.15);
}

.project-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 50%;
    background: #2563eb;
    border-radius: 0 3px 3px 0;
}

.project-item-color {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Search Results Dropdown */
#searchResults {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 179, 0.5) transparent;
}

#searchResults::-webkit-scrollbar {
    width: 6px;
}

#searchResults::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 179, 0.5);
    border-radius: 3px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(37, 99, 235, 0.05);
}

.search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-result-icon.project {
    background: #2563eb;
}

.search-result-icon.task {
    background: #10b981;
}

/* Dashboard Stats Card Animations */
.stat-card-number {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card-number.counting {
    transform: scale(1.05);
}

/* Recent Project Card - Clean */
.recent-project-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recent-project-card:hover {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Upcoming Task Card - Clean */
.upcoming-task-card {
    padding: 0.875rem;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.upcoming-task-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #f43f5e;
}

.upcoming-task-card.urgent::before {
    background: #dc2626;
}

.upcoming-task-card.high::before {
    background: #f59e0b;
}

.upcoming-task-card.medium::before {
    background: #2563eb;
}

.upcoming-task-card.low::before {
    background: #10b981;
}

.upcoming-task-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Modern Glassmorphism Enhancements */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.05),
        0 20px 25px -5px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.glass-card-hover:hover {
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.08),
        0 20px 25px -5px rgba(0, 0, 0, 0.06),
        0 25px 50px -12px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Gradient Text */
.gradient-text {
    color: #2563eb;
}

/* Gradient Border */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    border: 2px solid #2563eb;
}

/* Number Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-animate {
    animation: countUp 0.5s ease-out forwards;
}

/* Priority Badge Styles */
.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.priority-badge.urgent {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.priority-badge.high {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.priority-badge.medium {
    background: rgba(37, 99, 235, 0.15);
    color: #2563eb;
}

.priority-badge.low {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

/* Modern Scrollbar for Dashboard */
#welcomeScreen::-webkit-scrollbar {
    width: 8px;
}

#welcomeScreen::-webkit-scrollbar-track {
    background: transparent;
}

#welcomeScreen::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 179, 0.3);
    border-radius: 4px;
}

#welcomeScreen::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 179, 0.5);
}

/* Responsive Adjustments for Dashboard */
@media (max-width: 768px) {
    #welcomeScreen {
        padding: 1rem;
    }
    
    .recent-project-card {
        padding: 0.75rem;
    }
    
    .upcoming-task-card {
        padding: 0.75rem;
    }
}

/* Dark Mode Support for Dashboard - Clean */
.dark .recent-project-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(51, 65, 85, 0.5);
}

.dark .upcoming-task-card {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(51, 65, 85, 0.5);
}

.dark .project-item:hover {
    background: rgba(51, 65, 85, 0.5);
}

.dark .project-item.active {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.4);
}

/* Shimmer Loading Effect */
.shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.dark .shimmer {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}

/* Focus Ring for Accessibility */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Tooltip Styles */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 0.5rem 0.75rem;
    background: #1e293b;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.5rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 50;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

/* Button Hover Effect */
.btn-gradient {
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-gradient:hover::before {
    opacity: 1;
}

/* ======================================
   PETA PERMASALAHAN - MODERN SOFT UI
   ====================================== */

/* ============================== */
/* PERMASALAHAN — Modern Soft UI   */
/* ============================== */

/* --- Card Base --- */
.problem-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.problem-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.dark .problem-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .problem-card:hover {
    border-color: #475569;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* --- Card Body --- */
.problem-card-body {
    padding: 1.25rem 1.5rem;
}

/* --- Card Header Row --- */
.problem-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

/* --- Badge --- */
.problem-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.problem-badge.critical {
    background: #fef2f2;
    color: #dc2626;
}

.problem-badge.warning {
    background: #fffbeb;
    color: #d97706;
}

.problem-badge.safe {
    background: #ecfdf5;
    color: #059669;
}

.problem-badge.overdue {
    background: #ef4444;
    color: #ffffff;
}

.dark .problem-badge.critical {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

.dark .problem-badge.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #fde68a;
}

.dark .problem-badge.safe {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

.dark .problem-badge.overdue {
    background: #ef4444;
    color: #ffffff;
}

/* --- Percentage Label --- */
.problem-pct {
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.problem-pct.critical { color: #dc2626; }
.problem-pct.warning { color: #d97706; }
.problem-pct.safe { color: #059669; }

.dark .problem-pct.critical { color: #fca5a5; }
.dark .problem-pct.warning { color: #fde68a; }
.dark .problem-pct.safe { color: #6ee7b7; }

/* --- Card Title (Problem Statement) --- */
.problem-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.dark .problem-card-title {
    color: #f1f5f9;
}

/* --- Card Subtitle (Indicator) --- */
.problem-card-subtitle {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.dark .problem-card-subtitle {
    color: #94a3b8;
}

.problem-card-subtitle strong {
    color: #334155;
    font-weight: 600;
}

.dark .problem-card-subtitle strong {
    color: #e2e8f0;
}

/* --- Inline Meter --- */
.problem-meter {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.problem-meter-track {
    flex: 1;
    height: 4px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
}

.dark .problem-meter-track {
    background: #334155;
}

.problem-meter-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.problem-meter-fill.critical { background: #ef4444; }
.problem-meter-fill.warning { background: #f59e0b; }
.problem-meter-fill.safe { background: #10b981; }

.problem-meter-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dark .problem-meter-label {
    color: #64748b;
}

/* --- Info List --- */
.problem-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.problem-info-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.75rem;
    border-bottom: 1px solid #f8fafc;
}

.problem-info-row:last-child {
    border-bottom: none;
}

.dark .problem-info-row {
    border-bottom-color: #1e293b;
}

.problem-info-label {
    color: #94a3b8;
    font-weight: 500;
    min-width: 60px;
    flex-shrink: 0;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dark .problem-info-label {
    color: #64748b;
}

.problem-info-value {
    color: #334155;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.problem-info-value.wrap {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark .problem-info-value {
    color: #e2e8f0;
}

.problem-info-value.text-muted {
    color: #94a3b8;
    font-weight: 400;
}

/* --- Action Buttons --- */
.problem-card-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.dark .problem-card-actions {
    border-top-color: #334155;
}

.problem-card-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #94a3b8;
}

.problem-card-actions button:hover {
    background: #f1f5f9;
    color: #475569;
}

.dark .problem-card-actions button {
    color: #64748b;
}

.dark .problem-card-actions button:hover {
    background: #334155;
    color: #e2e8f0;
}

.problem-card-actions .btn-edit:hover {
    color: #4f46e5;
    background: #eef2ff;
}

.dark .problem-card-actions .btn-edit:hover {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.1);
}

.problem-card-actions .btn-delete:hover {
    color: #dc2626;
    background: #fef2f2;
}

.dark .problem-card-actions .btn-delete:hover {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
}

/* --- Section Header --- */
.problems-view-header {
    margin-bottom: 1.5rem;
    padding: 1.5rem 1.75rem;
    border-radius: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.dark .problems-view-header {
    background: #1e293b;
    border-color: #334155;
}

/* --- Stat Summary Bar --- */
.problem-stats-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 0.875rem;
    margin-top: 0.875rem;
    border-top: 1px solid #f1f5f9;
}

.dark .problem-stats-bar {
    border-top-color: #334155;
}

.problem-stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.problem-stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    flex-shrink: 0;
}

.problem-stat-dot.total { background: #6366f1; }
.problem-stat-dot.critical { background: #ef4444; }
.problem-stat-dot.safe { background: #10b981; }
.problem-stat-dot.warning { background: #f59e0b; }

.problem-stat-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
}

.dark .problem-stat-text {
    color: #94a3b8;
}

.problem-stat-text strong {
    color: #0f172a;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.dark .problem-stat-text strong {
    color: #f1f5f9;
}

/* --- Section Title --- */
.problem-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #0f172a;
}

.dark .problem-section-title {
    color: #f8fafc;
}

/* --- Add Button --- */
.problem-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.125rem;
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #ffffff;
    background: #0f172a;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.problem-add-btn:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.dark .problem-add-btn {
    background: #f8fafc;
    color: #0f172a;
}

.dark .problem-add-btn:hover {
    background: #e2e8f0;
    box-shadow: 0 4px 12px rgba(248, 250, 252, 0.1);
}

.problem-add-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* --- Card Entrance Animation --- */
.problem-card {
    animation: problemCardIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

.problem-card:nth-child(1) { animation-delay: 0ms; }
.problem-card:nth-child(2) { animation-delay: 50ms; }
.problem-card:nth-child(3) { animation-delay: 100ms; }
.problem-card:nth-child(4) { animation-delay: 150ms; }
.problem-card:nth-child(5) { animation-delay: 200ms; }
.problem-card:nth-child(6) { animation-delay: 250ms; }

/* --- Form Card --- */
.problem-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.dark .problem-form-card {
    background: #1e293b;
    border-color: #334155;
}

/* --- Modal --- */
.problem-modal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.dark .problem-modal-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.dark #problemModal .bg-slate-50\/80 {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

.dark #problemModal input::placeholder,
.dark #problemModal textarea::placeholder {
    color: #94a3b8 !important;
}

.dark #problemModal .bg-slate-100 {
    background: #334155 !important;
}

/* --- Empty State --- */
.problem-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.problem-empty-state .empty-icon-box {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.problem-empty-state .empty-icon-box svg {
    width: 28px;
    height: 28px;
    stroke: #94a3b8;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.dark .problem-empty-state .empty-icon-box {
    background: #334155;
    border-color: #475569;
}

.dark .problem-empty-state .empty-icon-box svg {
    stroke: #64748b;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .problem-card-body {
        padding: 1rem 1.125rem;
    }

    .problems-view-header {
        padding: 1.125rem 1.25rem;
    }

    .problem-stats-bar {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .problem-card-title {
        font-size: 0.8125rem;
    }

    .problem-info-label {
        min-width: 50px;
    }

    .problem-card-actions {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .problem-card-body {
        padding: 0.875rem 1rem;
    }

    .problem-card-header {
        flex-wrap: wrap;
    }

    .problem-info-row {
        flex-direction: column;
        gap: 0.125rem;
    }

    .problem-info-label {
        min-width: unset;
    }

    .problem-stats-bar {
        gap: 0.75rem;
    }

    .problem-stat-text {
        font-size: 0.6875rem;
    }
}

/* ========================================
   Project Modal - Modern Glassmorphism
   ======================================== */

/* Modal entrance animation */
#projectModalContent {
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#projectModalContent.modal-enter {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Glassmorphism card effect */
#projectModal .bg-white\/80 {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

/* Gradient header glow effect */
#projectModal .bg-gradient-to-br {
    position: relative;
}

#projectModal .bg-gradient-to-br::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -10px) rotate(1deg); }
    66% { transform: translate(-5px, 5px) rotate(-1deg); }
}

/* Input focus glow effect */
#projectForm input[type="text"]:focus,
#projectForm textarea:focus,
#projectForm select:focus,
#projectForm input[type="date"]:focus {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08), 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Color button active state */
.project-color-btn.ring-2 {
    transform: scale(1.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* File upload area animation */
#projectInitialDocsUpload label {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#projectInitialDocsUpload label:hover {
    transform: translateY(-2px);
}

/* AI option checkbox animation */
#generateAITasks {
    transition: all 0.2s ease;
}

#generateAITasks:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-color: #7c3aed;
    border-color: #7c3aed;
}

/* Submit button gradient animation */
#projectForm button[type="submit"] {
    background-size: 200% auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#projectForm button[type="submit"]:hover {
    background-position: right center;
    transform: translateY(-1px);
}

#projectForm button[type="submit"]:active {
    transform: translateY(0);
}

/* Custom scrollbar for form */
#projectForm .overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

#projectForm .overflow-y-auto::-webkit-scrollbar-track {
    background: transparent;
}

#projectForm .overflow-y-auto::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 179, 0.3);
    border-radius: 3px;
}

#projectForm .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 179, 0.5);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #projectModal .rounded-3xl {
        border-radius: 1.5rem;
    }

    #projectModal .px-8 {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    #projectModal .py-7 {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .project-color-btn {
        width: 2.25rem;
        height: 2.25rem;
    }
}
