:root {
    /* Permanent Light Theme - Subtle Lilac */
    --bg-dark: #f8f7fa;
    --bg-panel: #ffffff;
    --bg-card: #ffffff;
    --text-main: #1f1b2e;
    --text-muted: #6b6780;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);

    --border: #e2ddeb;

    --tag-red: #ef4444;
    --tag-blue: #3b82f6;
    --tag-green: #10b981;
    --tag-purple: #8b5cf6;
    --tag-orange: #f59e0b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    --event-blue: rgba(59, 130, 246, 0.15);
    --event-blue-text: #1d4ed8;
    --event-red: rgba(239, 68, 68, 0.15);
    --event-red-text: #b91c1c;
    --event-green: rgba(16, 185, 129, 0.15);
    --event-green-text: #047857;
    --event-purple: rgba(139, 92, 246, 0.15);
    --event-purple-text: #6d28d9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease-in-out;
    z-index: 1000;
}

.sidebar.closed {
    width: 80px;
    padding: 1.5rem 0;
}

.sidebar.closed span, 
.sidebar.closed .nav-title {
    opacity: 0;
    max-width: 0;
    visibility: hidden;
    margin: 0;
}

.sidebar .logo span,
.sidebar .nav-item span,
.sidebar .nav-title {
    transition: opacity 0.3s ease, max-width 0.3s ease, visibility 0.3s ease, margin 0.3s ease, transform 0.3s ease;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
}

.sidebar.closed .logo span {
    transform: translateX(-10px);
}

.sidebar.closed .nav-item span {
    transform: translateX(-5px);
}

.sidebar.closed .nav-item {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.closed .logo {
    justify-content: center;
    margin-bottom: 2.5rem; 
}


/* En desktop, el contenido se expande suavemente */
/* El contenido principal se define más abajo con Grid */

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2.5rem;
}

.mobile-only {
    display: none !important;
}

.sidebar-header {
    display: flex;
    align-items: center;
    width: 100%;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), var(--tag-blue));
    padding: 8px;
    border-radius: 10px;
    display: flex;
    color: white;
}

.nav-menu {
    flex: 1;
}

.nav-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-red {
    background: var(--tag-red);
}

.dot-blue {
    background: var(--tag-blue);
}

.icon-green { color: var(--tag-green); fill: rgba(16, 185, 129, 0.1); }

/* Ensure icons are centered in closed mode */
.sidebar.closed .nav-item i,
.sidebar.closed .nav-item svg {
    margin: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    display: grid;
    grid-template-rows: 70px 1fr;
    height: 100vh;
    overflow: hidden;
    min-width: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



/* Header */
.header {
    height: 70px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background-color: var(--bg-panel);
    /* backdrop filter remains */
    backdrop-filter: blur(10px);
    transition: background-color 0.3s, border-color 0.3s;
    z-index: 100;
    position: relative;
}


.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-dark);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 300px;
    transition: all 0.3s ease;
    position: relative;
}

.search-bar svg {
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.search-bar input {
    background: transparent;
    border: none;
    padding: 8px 0;
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-main);
    outline: none;
}

/* Tooltip for search */
.search-bar::after {
    content: 'Enter para buscar';
    position: absolute;
    right: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.search-bar:focus-within::after {
    opacity: 0.6;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    color: var(--text-main);
}

.user-profile {
    position: relative;
    z-index: 101;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    cursor: pointer;
}

/* Views Container */
.views-container {
    flex: 1;
    overflow: hidden;
    display: block; 
    position: relative;
    width: 100%;
    height: calc(100vh - 70px); /* Restar la altura del header para un alto fijo y robusto */
}



.view-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    overflow-y: auto; /* Permitir scroll si es necesario */
}

.view-section.active {
    display: flex !important;
}

#view-calendar.view-section {
    overflow: hidden !important;
}

#view-calendar .board-header {
    padding: 1rem 1.5rem 0.5rem; /* Reducido drásticamente */
}




/* Board Header */
.board-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}


.board-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.board-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-panel);
}

/* --- 1. KANBAN BOARD --- */
.kanban-board {
    display: flex;
    gap: 1rem;
    padding: 0 1rem 1rem;
    flex: 1;
    overflow-x: auto;
}


.kanban-board::-webkit-scrollbar {
    height: 8px;
}

.kanban-board::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.kanban-board::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.kanban-board::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.kanban-column {
    background-color: var(--bg-panel);
    border-radius: 12px;
    flex: 1;
    min-width: 260px;
    max-width: 400px;

    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s, border-color 0.3s;
}

#expired-column {
    border: 1px solid rgba(239, 68, 68, 0.2);
}

#expired-column .column-header {
    border-bottom: 2px solid #ef4444;
}


.column-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.column-header h2 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    background-color: var(--bg-dark);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Task Cards */
.task-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    cursor: grab;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background-color 0.3s;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.task-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 1rem;
    /* Evitar que descripciones largas rompan el diseño */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    min-height: 50px;
}

.task-list::-webkit-scrollbar {
    width: 6px;
}

.task-list::-webkit-scrollbar-track {
    background: transparent;
}

.task-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}


.task-completed {
    opacity: 0.6;
}

.task-completed h3 {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.tag-ui {
    background: rgba(139, 92, 246, 0.15);
    color: var(--tag-purple);
}

.tag-ui {
    color: #6d28d9;
}

.tag-dev {
    background: rgba(59, 130, 246, 0.15);
    color: var(--tag-blue);
}

.tag-dev {
    color: #1d4ed8;
}

.tag-high {
    background: rgba(124, 58, 237, 0.15);
    color: #7c3aed;
}

.tag-expired {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.task-card.expired {
    border-left: 4px solid #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}


.tag-medium {
    background: rgba(245, 158, 11, 0.15);
    color: var(--tag-orange);
}

.tag-medium {
    color: #b45309;
}

.tag-low {
    background: rgba(59, 130, 246, 0.15);
    color: var(--tag-blue);
}

.tag-low {
    color: #1d4ed8;
}

.tag-research {
    background: rgba(16, 185, 129, 0.15);
    color: var(--tag-green);
}

.task-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 600;
}


/* Modificadores para tareas completadas en Kanban */
.task-completed {
    background-color: var(--bg-dark);
    border: 1px dashed var(--tag-green);
    opacity: 0.75;
    transition: opacity 0.2s ease, border 0.2s ease;
}

.task-completed:hover {
    opacity: 1;
    border: 1px solid var(--tag-green);
}

.task-completed h3 {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-completed p {
    text-decoration: line-through;
}

.task-completed .task-date {
    color: var(--tag-green);
    font-weight: 600;
}


.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-assignees {
    display: flex;
}

.task-assignees img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    margin-right: -8px;
}

.task-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.task-date svg {
    width: 14px;
    height: 14px;
}


/* --- 2. LIST VIEW (MIS TAREAS) --- */
.list-view {
    padding: 0 2rem 2rem;
    flex: 1;
    overflow-y: auto;
}

.list-view::-webkit-scrollbar {
    width: 8px;
}

.list-view::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.list-view::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* FILTER BAR DESIGN */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 2rem;
    margin: -1rem 2rem 1.5rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.filter-label i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.filter-tags {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- CUSTOM DROPDOWN UI --- */
.custom-dropdown {
    position: relative;
    user-select: none;
    min-width: 200px;
}

.dropdown-header {
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 10px;
}

.dropdown-header:hover,
.custom-dropdown.open .dropdown-header {
    border-color: var(--primary);
}

.dropdown-header .select-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.dropdown-header .selected-text {
    flex-grow: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main) !important;
    display: inline-block !important;
    visibility: visible !important;
    min-height: 1.2em;
    line-height: 1.2;
}

.dropdown-header .dropdown-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.custom-dropdown.open .dropdown-chevron {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px;
    list-style: none;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.custom-dropdown.open .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-options li {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: background 0.2s, color 0.2s;
}

.dropdown-options li:hover {
    background: var(--bg-dark);
    color: var(--text-main);
}

.dropdown-options li.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.list-group {
    margin-bottom: 2rem;
}

.list-group-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.list-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.list-item-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.list-item-left h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.list-project {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.list-item-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.list-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 90px;
    text-align: right;
}

.list-date.today {
    color: var(--primary);
    font-weight: 500;
}

/* --- 3. CALENDAR VIEW --- */
.calendar-view {
    padding: 0 1.5rem 1rem; /* Margen inferior reducido */
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-sm);
}

#calendar-month-dropdown .dropdown-header,
#calendar-year-dropdown .dropdown-header {
    background: var(--bg-panel);
    border: none;
    box-shadow: none;
}

.header-select {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.header-select:focus {
    border-color: var(--primary);
}

.calendar-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: auto repeat(6, 1fr);
    gap: 1px;
    background-color: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    min-height: 0;
}


.cal-day-header {
    background-color: var(--bg-dark);
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cal-day {
    background-color: var(--bg-panel);
    padding: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: all 0.2s ease;
    min-height: 0;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.cal-day-num {
    margin-bottom: 2px;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.7;
}


@media (max-width: 768px) {
    .cal-day {
        min-height: 80px;
        padding: 5px;
        font-size: 0.85rem;
    }
}



.cal-day:hover {
    background-color: var(--bg-card);
    transform: scale(1.01);
    z-index: 5;
    box-shadow: var(--shadow-md);
}

.cal-day.empty {
    color: var(--text-muted);
    opacity: 0.3;
    background-color: var(--bg-dark);
}

.cal-day.today {
    border: 2px solid var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.cal-day.today::after {
    content: 'Hoy';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.55rem;
    background: var(--primary);
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 700;
}


.cal-event {
    font-size: 0.7rem;
    padding: 3px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border-left: 2px solid transparent;
    line-height: 1.2;
}

.cal-event span {
    opacity: 0.8;
    font-size: 0.65rem;
}

.cal-event:hover {
    transform: translateX(3px);
    transition: all 0.2s ease;
}

.cal-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: auto;
    padding-top: 4px;
}

.cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.6;
}

.cal-dot.high { background: #ef4444; }
.cal-dot.medium { background: #f59e0b; }
.cal-dot.low { background: #3b82f6; }
.cal-dot.done { background: #10b981; opacity: 0.4; }

.day-view-item {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.day-view-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    background: white;
}

.event-blue {
    background-color: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
    border-left-color: #3b82f6;
}

.event-violet {
    background-color: rgba(124, 58, 237, 0.15);
    color: #7c3aed;
    border-left-color: #7c3aed;
}

.event-orange {
    background-color: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border-left-color: #f59e0b;
}

.event-red {
    background-color: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    border-left-color: #ef4444;
}

.event-green {
    background-color: rgba(16, 185, 129, 0.15);
    color: #047857;
    border-left-color: #10b981;
}


.event-orange {
    background-color: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border-left-color: #f59e0b;
}

.event-purple {
    background-color: rgba(139, 92, 246, 0.15);
    color: #6d28d9;
    border-left-color: #8b5cf6;
}


/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    display: flex;
    align-items: center; 
    justify-content: center;
    z-index: 5000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg-panel);
    width: 100%;
    max-width: 550px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1), 
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(99, 102, 241, 0.05);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    color: var(--text-main);
    max-height: 90vh;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-small {
    max-width: 440px;
}

.modal-medium {
    max-width: 720px;
}

.modal-large {
    max-width: 900px;
}

.view-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 12px;
}

.info-item {
    flex: 1;
    min-width: 120px;
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 700;
}

.info-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    overflow: visible;
}

.info-desc-box {
    background: var(--bg-dark);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.6;
}

.view-progress-container {
    margin-top: 1rem;
}

.modal-body {
    padding: 1.5rem 1.8rem;
    font-size: 0.95rem;
    overflow-y: auto;
    color: var(--text-muted);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(99, 102, 241, 0.03), transparent);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.close-modal {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-modal:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
    transform: rotate(90deg);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.modal-footer button {
    margin: 0;
}

.task-form {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select,
.dropdown-header {
    background: var(--bg-dark);
    border: 1.5px solid var(--border);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Modificar icono de modo */
.icon-sun {
    display: block;
}

/* --- LOGIN PAGE --- */
/* --- LOGIN PAGE REIMAGINED --- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    background: linear-gradient(135deg, #020617 0%, #1e1b4b 50%, #4c1d95 100%);
    position: relative;
    overflow-x: hidden;
    overflow-y: hidden; /* Evitar scroll si es posible */
    padding: 1rem;
}

/* Bolas de luz decorativas */
.login-body::before, .login-body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    opacity: 0.35;
    pointer-events: none;
}

.login-body::before {
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    background: var(--primary);
    top: -10%;
    right: -10%;
}

.login-body::after {
    width: min(400px, 70vw);
    height: min(400px, 70vw);
    background: #a855f7;
    bottom: -5%;
    left: -10%;
}

.login-container {
    width: 100%;
    max-width: min(380px, 95vw); /* Más compacto horizontalmente */
    animation: loginFadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 10;
}

@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.75rem 2rem; /* Mucho más compacto */
    border-radius: 2rem;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
    transition: all 0.4s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 1.25rem; /* Menos espacio */
}

.login-header .logo-icon {
    width: 48px; /* Más pequeño */
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    color: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.login-header h1 {
    font-size: 1.5rem; /* Título más pequeño */
    font-weight: 800;
    color: white;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.login-header p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem; /* Menos gap interno */
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Notification styles */
.notification {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: none;
    text-align: center;
    animation: notifyIn 0.3s ease;
}

@keyframes notifyIn {
    from { opacity: 0; scale: 0.95; }
    to { opacity: 1; scale: 1; }
}

.notification.error {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: block;
}

.notification.success {
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
    display: block;
}

/* Input Premium Styling Refined (Scoped to Login) */
.login-card .form-group {
    position: relative;
    margin-bottom: 0.25rem;
}

.login-card .form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    padding-left: 4px;
}

.login-card .form-group input {
    width: 100%;
    padding: 11px 14px;
    padding-left: 44px; 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.login-card .form-group input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    outline: none;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.6);
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.remember-me input {
    width: 15px !important;
    height: 15px !important;
    accent-color: var(--primary);
}

.forgot-pass {
    color: #a78bfa;
    text-decoration: none;
    font-weight: 500;
}

.forgot-pass:hover {
    color: white;
}

.login-btn {
    width: 100%;
    justify-content: center;
    padding: 11px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 0.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
    border: none;
    color: white;
    cursor: pointer;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

.login-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.login-footer a {
    color: #cebcff;
    text-decoration: none;
    font-weight: 700;
}

.form-group::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 32px;
    width: 16px;
    height: 16px;
    opacity: 0.4;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.form-group:focus-within::before {
    opacity: 0.8;
}

/* Tipos de iconos por ID */
.form-group:has(#full-name)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23cebcff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E"); }
.form-group:has(#username)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23cebcff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'%3E%3C/circle%3E%3Cpath d='M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8'%3E%3C/path%3E%3C/svg%3E"); }
.form-group:has(#email)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23cebcff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'%3E%3C/rect%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'%3E%3C/path%3E%3C/svg%3E"); }
.form-group:has(#password)::before, .form-group:has(#new-password)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23cebcff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E"); }
.form-group:has(#verification-code)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23cebcff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 17 13.5 8.5 8.5 13.5 2 7'%3E%3C/polyline%3E%3Cpolyline points='16 17 22 17 22 11'%3E%3C/polyline%3E%3C/svg%3E"); left: 16px; top: 38px;}

/* Animaciones para pasos */
#reg-step-1, #reg-step-2, #password-group {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Social Login Buttons */
.social-login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 0.5rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-social:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

.facebook-btn:hover {
    border-color: #1877f2;
}

/* Separator */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.75rem 0;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.separator span {
    padding: 0 10px;
}


/* List Item Actions (Edit / Delete) */
.list-item-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 1;
    /* Siempre visibles */
    transition: filter 0.2s, opacity 0.2s;
}

@media (max-width: 768px) {
    .list-item-actions {
        opacity: 1;
        /* Always visible on mobile */
    }
}

.list-item:hover .list-item-actions {
    filter: brightness(1.2);
    /* Solo agregar brillo en hover */
}

/* --- GANTT CHART DESIGN --- */
.gantt-container {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
    margin-top: 1rem;
}

.gantt-timeline {
    display: flex;
    flex-direction: column;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    margin-left: 200px;
    /* Space for task names */
}

.gantt-months {
    display: flex;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.gantt-days {
    display: flex;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.gantt-days span {
    flex: 1;
    text-align: center;
    position: relative;
}

.gantt-days span::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background: var(--border);
}

.gantt-tasks {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gantt-row {
    display: flex;
    height: 48px;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
}

.gantt-row:hover {
    background: rgba(99, 102, 241, 0.02);
}

.gantt-task-name {
    width: 200px;
    min-width: 200px;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    font-size: 0.85rem;
    border-right: 2px solid var(--border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gantt-container {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin: 0 auto 2rem;
    max-width: 1300px;
    width: 95%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.gantt-timeline {
    display: flex;
    flex-direction: column;
    min-width: 800px; /* Asegurar que no se colapse */
}

.gantt-months {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--bg-dark);
}

.gantt-months span {
    padding: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    border-right: 1px solid var(--border);
    text-align: center;
}

.gantt-days {
    display: flex;
    border-bottom: 2px solid var(--border);
}

.gantt-days span {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 8px 0;
    font-size: 0.8rem;
    font-weight: 600;
    border-right: 1px solid var(--border);
    color: var(--text-muted);
}

.gantt-tasks {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 400px;
    background: #ffffff;
    position: relative;
    scrollbar-width: thin; /* Para Firefox */
    scrollbar-color: rgba(99, 102, 241, 0.2) transparent;
}

/* Scrollbar Personalizada para Chrome/Safari */
.gantt-tasks::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.gantt-tasks::-webkit-scrollbar-track {
    background: transparent;
}

.gantt-tasks::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.15);
    border-radius: 10px;
}

.gantt-tasks::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.3);
}

.gantt-bars-area {
    flex-grow: 1;
    position: relative;
    height: 100%;
    min-width: 800px; /* Coincidir con el timeline */
    background: repeating-linear-gradient(to right,
            transparent,
            transparent calc(7.1428% - 0.5px),
            rgba(99, 102, 241, 0.03) calc(7.1428% - 0.5px),
            rgba(99, 102, 241, 0.03) 7.1428%);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.01);
}

.gantt-today-line {
    position: absolute;
    top: 5px; /* Pequeño margen superior para que no toque el borde */
    bottom: 0;
    width: 2px;
    background: var(--primary);
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.gantt-today-line span {
    position: absolute;
    bottom: 5px; /* Pegada abajo para no molestar arriba */
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gantt-bar {
    position: absolute;
    height: 28px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 20px; /* Pill shape */
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.gantt-bar:hover {
    filter: brightness(1.05); /* Solo un leve brillo, sin animación ni escala */
}

.gantt-bar-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.gantt-bar-text {
    position: relative;
    width: 100%;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    z-index: 2;
    pointer-events: none;
}

.gantt-bar:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.gantt-bar.prio-high {
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    /* Violet gradient */
}

.gantt-bar.prio-medium {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    /* Orange/Yellow gradient */
}

.gantt-bar.prio-low {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    /* Blue gradient */
}

.gantt-bar.expired {
    background: linear-gradient(90deg, #ef4444, #f87171) !important;
    /* Red gradient for expired */
}

.gantt-bar.completed {
    background: linear-gradient(90deg, #10b981, #34d399) !important;
    /* Green gradient for completed */
}


.action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: var(--bg-dark);
    color: var(--text-main);
}

.action-btn.delete:hover {
    color: var(--tag-red);
}

.action-btn.edit:hover {
    color: var(--tag-blue);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Modales de Alerta Especiales */
.delete-modal .modal-header h2 {
    color: var(--tag-red);
}

.warning-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(239, 68, 68, 0.05);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-bottom: 2rem;
    color: var(--text-main);
    line-height: 1.5;
}

.warning-box svg {
    color: var(--tag-red);
    flex-shrink: 0;
}

.reauth-msg {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.btn-danger-outline {
    background: transparent;
    border: 2px solid var(--tag-red);
    color: var(--tag-red);
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger-outline:hover {
    background: var(--tag-red);
    color: white;
    box-shadow: 0 8px 15px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

/* ========================================= */
/* --- 📱 RESPONSIVE DESIGN (Media Queries) --- */
/* ========================================= */

@media (max-width: 1200px) {
    .kanban-board {
        gap: 0.75rem;
    }
    .kanban-column {
        min-width: 250px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    .sidebar.closed {
        width: 70px;
    }
    .header {
        padding: 0 1.5rem;
    }
}

@media (max-width: 900px) {
    .kanban-board {
        padding: 0 1.5rem 1.5rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .mobile-only {
        display: flex !important;
    }
    
    .sidebar-header {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border);
    }

    /* Menú Lateral Oculto por Defecto en Móvil */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 2000;
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 20px 0 50px rgba(0,0,0,0.15);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Ajustar Cabecera Principal */
    .header {
        padding: 0 1rem;
        height: 60px;
    }

    .main-content {
        grid-template-rows: 60px 1fr;
    }

    .search-bar {
        max-width: 180px;
        padding: 6px 12px;
    }
    
    .search-bar input {
        font-size: 0.85rem;
    }

    .header-actions {
        gap: 0.75rem;
    }

    /* Vistas y contenedores */
    .board-header {
        padding: 1.5rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
    
    .board-header h1 {
        font-size: 1.5rem;
    }

    .kanban-board {
        flex-direction: column;
        overflow-y: visible;
        padding: 0 1rem 1rem;
    }

    .kanban-column {
        min-width: 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .list-view,
    .calendar-view,
    .gantt-container {
        padding: 1rem;
    }

    /* Filtros (Mis tareas) */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        margin: 0 1rem 1.5rem;
        padding: 1rem;
        gap: 1rem;
    }

    .filter-tags {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .custom-dropdown {
        width: 100%;
    }

    /* Diagrama Gantt */
    .gantt-timeline {
        margin-left: 120px;
    }

    .gantt-task-name {
        width: 120px;
        font-size: 0.8rem;
    }

    /* Modal Formulario */
    .modal {
        width: 92%;
        margin: 10px auto;
        max-height: 90vh;
    }

    .form-row {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .modal-header, .modal-footer {
        padding: 1.25rem;
    }
    
    .task-form {
        padding: 1rem 1.25rem;
    }

    /* Calendario */
    .calendar-controls {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    
    .calendar-controls .custom-dropdown {
        flex: 1;
        min-width: 0;
    }

    .calendar-grid {
        grid-template-rows: auto repeat(6, 1fr);
        min-height: 400px;
    }

    .cal-day {
        min-height: 70px;
        padding: 4px;
        font-size: 0.75rem;
    }

    .cal-day-header {
        padding: 8px 2px;
        font-size: 0.7rem;
    }
    
    .cal-event {
        font-size: 0.65rem;
        padding: 2px 4px;
    }
}

@media (max-width: 480px) {
    .header-left {
        gap: 8px;
    }
    
    .search-bar {
        display: none; /* Hide search on very small phones to avoid overlap */
    }
    
    .search-bar.active-mobile {
        display: flex;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        max-width: none;
        z-index: 100;
        border-radius: 0;
        border-right: none;
        border-left: none;
    }

    .user-profile img {
        width: 32px;
        height: 32px;
    }
    
    .board-header {
        text-align: center;
        align-items: center;
    }
    
    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 1rem;
    }
    
    .list-item-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    background: var(--bg-panel);
    color: var(--text-main);
    box-shadow: var(--shadow-lg);
    z-index: 10000 !important;
    display: none;
    animation: slideIn 0.3s ease-out;
    border-left: 5px solid var(--primary);
    font-weight: 600;
}

.notification.success {
    border-left-color: var(--tag-green);
}

.notification.error {
    border-left-color: var(--tag-red);
}

.notification.warning {
    border-left-color: var(--tag-orange);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- PREMIUM MODAL STYLES (LOGIN) --- */
.login-modal-content {
    background: rgba(30, 41, 59, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 28px !important;
    padding: 2.5rem !important;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon-container {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.modal-icon-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.modal-icon-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.modal-icon-info {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.modal-title-premium {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
}

.modal-message-premium {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.btn-premium-modal {
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-premium-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* OTP Container */
.otp-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

#verification-code:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    outline: none;
}

/* Profile Modal Styles */
.profile-modal-body {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-info-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    object-fit: cover;
}

.profile-text-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.profile-text-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.profile-actions {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-danger-outline:hover {
    background: #ef4444;
    color: white;
}

/* Delete confirmation modal specific */
.delete-modal {
    max-width: 450px;
}

.text-danger {
    color: #ef4444;
}

.warning-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.warning-box svg {
    color: #ef4444;
    flex-shrink: 0;
}

.warning-box p {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.5;
}

.reauth-msg {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

