/* ============== DASHBOARD ============== */
/* PWA Styles */
.btn-install,
.btn-theme {
    background: var(--ld-gradient, linear-gradient(135deg, #4b8cff, #a368ff));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-install:hover,
.btn-theme:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.connection-status {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    margin-top: 5px;
    font-weight: 500;
}

.connection-status.online {
    background: #d4edda;
    color: #155724;
}

.connection-status.offline {
    background: #f8d7da;
    color: #721c24;
}

.dashboard-filters select {
    padding: 8px 16px;
    border: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    border-radius: 8px;
    font-size: 0.95em;
    cursor: pointer;
    background: var(--ld-surface, rgba(9, 9, 26, 0.86));
}


.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: var(--ld-gradient, linear-gradient(135deg, #4b8cff, #a368ff));
    color: white;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.metric-icon {
    font-size: 3em;
    opacity: 0.9;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.chart-container {
    background: var(--ld-surface, rgba(9, 9, 26, 0.86));
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
    color: var(--ld-text, #f7f7ff);
    margin-bottom: 20px;
    font-size: 1.2em;
}

.chart-container canvas {
    max-height: 300px;
}

.dashboard-section {
    background: var(--ld-surface, rgba(9, 9, 26, 0.86));
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.dashboard-section h3 {
    color: var(--ld-text, #f7f7ff);
    margin-bottom: 20px;
    font-size: 1.3em;
    border-bottom: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    padding-bottom: 10px;
}

/* Heatmap */
.heatmap-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 10px 0;
}

.heatmap-day {
    aspect-ratio: 1;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.055);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    color: var(--ld-muted, #a3a3c2);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.heatmap-day:hover {
    transform: scale(1.1);
    z-index: 10;
}

.heatmap-day.level-0 { background: #ebedf0; }
.heatmap-day.level-1 { background: #c6e48b; }
.heatmap-day.level-2 { background: #7bc96f; }
.heatmap-day.level-3 { background: #239a3b; }
.heatmap-day.level-4 { background: #196127; color: white; }

.heatmap-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    margin-bottom: 5px;
}

.heatmap-day:hover .heatmap-tooltip {
    opacity: 1;
}

/* Dashboard Proyectos */
.dashboard-proyectos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.dashboard-proyecto-item {
    padding: 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.055);
    border-left: 4px solid var(--dashboard-project-color, var(--ld-primary, #4b8cff));
    transition: all 0.3s;
    cursor: pointer;
}

.dashboard-proyecto-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-proyecto-nombre {
    font-weight: 600;
    color: var(--ld-text, #f7f7ff);
    margin-bottom: 8px;
}

.dashboard-proyecto-progreso {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    color: var(--ld-muted, #a3a3c2);
}

.dashboard-proyecto-progreso .progress-bar {
    flex: 1;
}

.dashboard-project-progress {
    width: var(--dashboard-progress, 0%);
    background: var(--dashboard-project-color, var(--ld-primary, #4b8cff));
}

/* Dashboard Tareas Urgentes */
.dashboard-tareas-urgentes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-tarea-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 10px;
    transition: all 0.3s;
    cursor: pointer;
}

.dashboard-tarea-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-tarea-prioridad {
    width: 10px;
    height: 50px;
    border-radius: 5px;
}

.dashboard-tarea-prioridad.alta { background: #e74c3c; }
.dashboard-tarea-prioridad.media { background: #f39c12; }
.dashboard-tarea-prioridad.baja { background: #95a5a6; }

.dashboard-tarea-info {
    flex: 1;
}

.dashboard-tarea-titulo {
    font-weight: 600;
    color: var(--ld-text, #f7f7ff);
    margin-bottom: 5px;
}

.dashboard-tarea-fecha {
    font-size: 0.85em;
    color: var(--ld-muted, #a3a3c2);
}

/* ============== POMODORO ============== */
.pomodoro-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.pomodoro-timer {
    background: var(--ld-surface, rgba(9, 9, 26, 0.86));
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.timer-circle {
    position: relative;
    width: 300px;
    height: 300px;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 8;
}

.timer-progress {
    fill: none;
    stroke: #4b8cff;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4em;
    font-weight: bold;
    color: var(--ld-text, #f7f7ff);
    font-family: 'Courier New', monospace;
}

.timer-mode {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--ld-text, #f7f7ff);
}

.timer-controls {
    display: flex;
    gap: 15px;
}

.btn-timer {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-start {
    background: var(--ld-gradient, linear-gradient(135deg, #4b8cff, #a368ff));
    color: white;
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-pause {
    background: #f39c12;
    color: white;
}

.btn-pause:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.btn-reset {
    background: rgba(255, 255, 255, 0.055);
    color: var(--ld-text, #f7f7ff);
}

.btn-reset:hover {
    background: var(--border-color);
}

.btn-save {
    background: rgba(75, 140, 255, 0.16);
    color: var(--ld-text, #f7f7ff);
}

.btn-save:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(75, 140, 255, 0.26);
}

.btn-complete {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.btn-complete:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.pomodoro-config {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 12px;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-item label {
    font-weight: 600;
    color: var(--ld-text, #f7f7ff);
}

.config-item input {
    width: 80px;
    padding: 8px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    text-align: center;
}

.pomodoro-stats {
    background: var(--ld-surface, rgba(9, 9, 26, 0.86));
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pomodoro-stats h3 {
    color: var(--ld-text, #f7f7ff);
    font-size: 1.2em;
    border-bottom: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.pomodoro-stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 10px;
}

.stat-icon {
    font-size: 2em;
}

.stat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-info strong {
    color: var(--ld-text, #f7f7ff);
    font-size: 0.95em;
}

.stat-info span {
    color: #bfdbfe;
    font-size: 1.5em;
    font-weight: bold;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--ld-gradient, linear-gradient(135deg, #4b8cff, #a368ff));
    transition: width 0.3s;
    border-radius: 10px;
}

.historial-task-title {
    font-weight: 600;
}

.pomodoro-tarea-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    background: var(--ld-surface, rgba(9, 9, 26, 0.86));
}

.historial-pomodoro {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.historial-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    gap: 10px;
}

.historial-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.historial-item-content {
    flex: 1;
    min-width: 0;
}

.historial-time {
    color: var(--ld-muted, #a3a3c2);
}

.historial-duracion {
    font-weight: 600;
    color: #bfdbfe;
    white-space: nowrap;
}

.historial-delete-btn {
    background: transparent;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    transition: all 0.2s;
    white-space: nowrap;
}

.historial-delete-btn:hover {
    background: #fee;
    color: #c0392b;
}

/* ============== KANBAN ============== */
.view-toggle {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.055);
    padding: 4px;
    border-radius: 10px;
}

.view-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--ld-text, #f7f7ff);
    transition: all 0.3s;
}

.view-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.view-btn.active {
    background: var(--ld-gradient, linear-gradient(135deg, #4b8cff, #a368ff));
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.vista-tareas {
    display: none;
}

.vista-tareas.active {
    display: block;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.kanban-column {
    background: rgba(255, 255, 255, 0.055);
    border-radius: 15px;
    padding: 20px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

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

.kanban-header h3 {
    margin: 0;
    color: var(--ld-text, #f7f7ff);
    font-size: 1.2em;
}

.kanban-count {
    background: var(--ld-surface, rgba(9, 9, 26, 0.86));
    color: var(--ld-text, #f7f7ff);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9em;
}

.kanban-tasks {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    padding: 5px;
}

.kanban-tasks.drag-over {
    background: rgba(75, 140, 255, 0.10);
    border: 2px dashed rgba(75, 140, 255, 0.62);
    border-radius: 10px;
}

.kanban-empty-state {
    padding: 20px;
    color: var(--ld-muted, #a3a3c2);
    font-style: italic;
    text-align: center;
}

.kanban-task {
    background: var(--ld-surface, rgba(9, 9, 26, 0.86));
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: move;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

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

.kanban-task.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.kanban-task.prioridad-alta {
    border-left-color: #e74c3c;
}

.kanban-task.prioridad-media {
    border-left-color: #f39c12;
}

.kanban-task.prioridad-baja {
    border-left-color: #95a5a6;
}

.kanban-task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
}

.kanban-task-title {
    font-weight: 600;
    color: var(--ld-text, #f7f7ff);
    font-size: 1em;
    flex: 1;
    word-break: break-word;
}

.kanban-task-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.kanban-task-description {
    color: var(--ld-muted, #a3a3c2);
    font-size: 0.9em;
    margin-bottom: 10px;
    line-height: 1.4;
}

.kanban-task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    color: var(--ld-muted, #a3a3c2);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
}

.kanban-task-fecha {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kanban-task-project {
    margin-left: 10px;
}

.kanban-task-actions {
    display: flex;
    gap: 5px;
}

.kanban-task-actions button {
    padding: 5px 10px;
    border: none;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.3s;
}

.kanban-task-actions button:hover {
    background: var(--border-color);
}

/* Arrastrar tareas en lista */
.tarea-card {
    cursor: move;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.tarea-card.dragging {
    opacity: 0.5;
}

.items-container.drag-over {
    background: rgba(102, 126, 234, 0.05);
}

/* Responsive Kanban */
@media (max-width: 1200px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }
    
    .kanban-column {
        min-height: 400px;
    }
    
    .view-toggle {
        width: 100%;
    }
    
    .view-btn {
        flex: 1;
    }
}

/* ============== BACKUP & IMPORT/EXPORT ============== */
.backup-section {
    background: var(--ld-surface, rgba(9, 9, 26, 0.86));
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.backup-section h3 {
    color: #bfdbfe;
    margin-bottom: 20px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.backup-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.btn-export,
.btn-import {
    background: var(--ld-gradient, linear-gradient(135deg, #4b8cff, #a368ff));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
    display: inline-block;
}

.btn-export:hover,
.btn-import:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.help-text {
    color: var(--ld-muted, #a3a3c2);
    font-size: 0.9em;
    line-height: 1.6;
    padding: 15px;
    background: rgba(255, 255, 255, 0.045);
    border-left: 4px solid rgba(75, 140, 255, 0.58);
    border-radius: 5px;
}

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

.stat-item {
    background: rgba(75, 140, 255, 0.12);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    font-size: 0.9em;
    color: var(--ld-muted, #a3a3c2);
    font-weight: 500;
}

.stat-value {
    font-size: 1.2em;
    color: #bfdbfe;
    font-weight: bold;
}

.storage-info {
    padding: 20px;
    background: rgba(255, 255, 255, 0.045);
    border-radius: 10px;
}

.storage-bar {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.storage-used {
    height: 100%;
    background: var(--ld-gradient, linear-gradient(135deg, #4b8cff, #a368ff));
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9em;
}

#storageText {
    color: var(--ld-muted, #a3a3c2);
    font-size: 0.95em;
    text-align: center;
}

.backup-item {
    animation: fadeInUp 0.3s ease;
}

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

/* Responsive */
@media (max-width: 968px) {
    .pomodoro-container {
        grid-template-columns: 1fr;
    }
    
    .timer-circle {
        width: 250px;
        height: 250px;
    }
    
    .timer-display {
        font-size: 3em;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .heatmap-container {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
    }
}

@media (max-width: 600px) {
    .dashboard-metrics {
        grid-template-columns: 1fr;
    }
    
    .timer-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-timer {
        width: 100%;
    }
}

/* ============== FILTROS AVANZADOS ============== */
.panel-filtros {
    background: var(--ld-surface, rgba(9, 9, 26, 0.86));
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    animation: slideDown 0.3s ease;
}

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

.filtros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filtro-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filtro-item label {
    font-weight: 600;
    color: var(--ld-text, #f7f7ff);
    font-size: 0.9em;
}

.filtro-item input,
.filtro-item select {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95em;
    transition: all 0.3s;
}

.filtro-item input:focus,
.filtro-item select:focus {
    outline: none;
    border-color: #bfdbfe;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filtros-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    flex-wrap: wrap;
    gap: 10px;
}

.contador-resultados {
    font-weight: 600;
    color: #bfdbfe;
    font-size: 1.1em;
}

.badge-filtros {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: bold;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Transiciones suaves */
body,
.container,
.task-card,
.project-card,
.note-card,
.modal-content,
input,
textarea,
select,
.tab-button {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ============== RESPONSIVE FILTROS ============== */
@media (max-width: 768px) {
    .filtros-grid {
        grid-template-columns: 1fr;
    }
    
    .filtros-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filtros-actions button {
        width: 100%;
    }
}

.backup-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
    gap: 16px;
    margin-bottom: 22px;
}

.config-toggle-row,
.config-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--ld-text, #f8fafc);
}

.config-toggle-row small,
.config-field span {
    display: block;
    color: var(--ld-muted, #a3a3c2);
    font-size: 0.86rem;
    margin-top: 4px;
}

.config-toggle-row input {
    width: 20px;
    height: 20px;
    accent-color: #4b8cff;
    flex: 0 0 auto;
}

.config-field {
    align-items: flex-start;
    flex-direction: column;
}

.config-field select {
    width: 100%;
}

@media (max-width: 700px) {
    .backup-settings-grid {
        grid-template-columns: 1fr;
    }
}

/* ============== PRODUCT UI OVERRIDES ============== */
.dashboard-metrics {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.metric-card {
    background: var(--ld-surface, rgba(9, 9, 26, 0.86));
    color: var(--ui-text, #1f2937);
    padding: 18px;
    border: 1px solid var(--ui-border, #d9e1ec);
    border-radius: 8px;
    box-shadow: var(--ui-shadow-soft, 0 2px 12px rgba(15, 23, 42, 0.06));
    align-items: flex-start;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ui-shadow, 0 10px 30px rgba(15, 23, 42, 0.08));
}

.metric-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(75, 140, 255, 0.14);
    color: var(--ui-primary, #355cff);
    font-size: 1.35rem;
}

.metric-value {
    color: var(--ui-text, #1f2937);
    font-size: 2rem;
    line-height: 1;
}

.metric-label {
    color: var(--ui-text-muted, #64748b);
    font-size: 0.86rem;
}

.dashboard-charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.chart-container,
.dashboard-section {
    padding: 20px;
    border: 1px solid var(--ui-border, #d9e1ec);
    border-radius: 8px;
    box-shadow: var(--ui-shadow-soft, 0 2px 12px rgba(15, 23, 42, 0.06));
}

.chart-container h3,
.dashboard-section h3 {
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: 0;
    color: var(--ui-text, #1f2937);
    font-size: 1rem;
}

.chart-container canvas {
    max-height: 260px;
}

.kanban-board {
    gap: 14px;
    align-items: stretch;
}

.kanban-column {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--ui-border, #d9e1ec);
    border-radius: 8px;
    padding: 12px;
}

.kanban-header {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ui-border, #d9e1ec);
}

.kanban-header h3 {
    font-size: 0.95rem;
    color: var(--ui-text, #1f2937);
}

.kanban-count {
    background: rgba(255, 255, 255, 0.07);
    color: var(--ui-text-muted, #64748b);
}

.kanban-task {
    border: 1px solid var(--ui-border, #d9e1ec);
    border-left-width: 3px;
    border-radius: 8px;
    box-shadow: none;
}

.kanban-task:hover {
    transform: translateY(-1px);
    box-shadow: var(--ui-shadow-soft, 0 2px 12px rgba(15, 23, 42, 0.06));
}

@media (max-width: 1100px) {
    .dashboard-metrics,
    .dashboard-charts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .dashboard-metrics,
    .dashboard-charts {
        grid-template-columns: 1fr;
    }

    .metric-card {
        padding: 14px;
    }

    .metric-icon {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }

    .metric-value {
        font-size: 1.7rem;
    }

    .chart-container,
    .dashboard-section {
        padding: 16px;
    }

    .kanban-board {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(260px, 84vw);
        overflow-x: auto;
        padding-bottom: 8px;
        scroll-snap-type: x proximity;
    }

    .kanban-column {
        scroll-snap-align: start;
    }
}

/* ============== DASHBOARD PROFESSIONAL POLISH ============== */
.dashboard-metrics {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
}

.metric-card {
    min-height: 104px;
    padding: 16px;
    gap: 12px;
    border-radius: 8px;
}

.metric-icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
    font-weight: 800;
}

.metric-value {
    font-size: 1.85rem;
    font-weight: 850;
}

.metric-label {
    margin-top: 4px;
    font-size: 0.8rem;
    line-height: 1.25;
}

.dashboard-charts {
    gap: 14px;
    margin-bottom: 18px;
}

.chart-container,
.dashboard-section {
    border-radius: 8px;
    box-shadow: none;
}

.chart-container h3,
.dashboard-section h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 28px;
    margin-bottom: 14px;
    color: var(--ui-text, #1f2937);
    font-size: 0.96rem;
    font-weight: 800;
}

.dashboard-section {
    margin-bottom: 14px;
}

.heatmap-container {
    gap: 6px;
}

.heatmap-day {
    border-radius: 5px;
    font-size: 0.72rem;
}

.heatmap-day:hover {
    transform: none;
    outline: 2px solid rgba(17, 24, 39, 0.18);
}

.dashboard-proyectos,
.dashboard-tareas-urgentes {
    gap: 10px;
}

.dashboard-proyecto-item,
.dashboard-tarea-item {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--ui-border, #d9e1ec);
    border-left: 3px solid var(--dashboard-project-color, var(--ui-primary, #355cff));
    border-radius: 8px;
    box-shadow: none;
}

.dashboard-tarea-item {
    --dashboard-project-color: var(--ui-primary, #355cff);
}

.dashboard-proyecto-item:hover,
.dashboard-tarea-item:hover {
    transform: none;
    border-color: var(--ui-border-strong, #b8c4d6);
}

.dashboard-proyecto-nombre,
.dashboard-tarea-titulo {
    color: var(--ui-text, #1f2937);
    font-weight: 800;
}

@media (max-width: 1100px) {
    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .dashboard-metrics {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 92px;
    }
}

/* ============== LA-DSIGN DASHBOARD FINAL OVERRIDES ============== */
.btn-install,
.btn-theme,
.btn-timer,
.btn-backup,
.btn-export,
.btn-import,
.timer-display {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dashboard-filters select,
.pomodoro-task-select,
.pomodoro-tarea-select,
.backup-section input,
.backup-section select,
.backup-section textarea {
    background: rgba(255, 255, 255, 0.055);
    color: var(--ld-text, #f7f7ff);
    border-color: var(--ld-border, rgba(148, 163, 184, 0.22));
}

.connection-status {
    display: flex;
    width: fit-content;
    margin: 12px 0 0 auto;
    border: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    box-shadow: none;
}

.connection-status.online {
    background: rgba(52, 211, 153, 0.14);
    color: #86efac;
}

.connection-status.offline {
    background: rgba(255, 61, 113, 0.14);
    color: #ff9fbd;
}

.dashboard-proyecto-item,
.dashboard-tarea-item,
.pomodoro-timer,
.pomodoro-stats,
.pomodoro-settings,
.historial-item,
.backup-item,
.backup-card,
.import-area,
.kanban-column,
.kanban-task,
.stack-group {
    background:
        radial-gradient(circle at top left, rgba(75, 140, 255, 0.12), transparent 44%),
        radial-gradient(circle at bottom right, rgba(163, 104, 255, 0.10), transparent 48%),
        var(--ld-surface, rgba(9, 9, 26, 0.86));
    border-color: var(--ld-border, rgba(148, 163, 184, 0.22));
    color: var(--ld-text, #f7f7ff);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.pomodoro-config,
.pomodoro-stat-item,
.config-item,
.storage-info,
.import-area,
.backup-status {
    background: rgba(255, 255, 255, 0.045);
    border-color: var(--ld-border, rgba(148, 163, 184, 0.22));
    color: var(--ld-text, #f7f7ff);
}

.dashboard-proyecto-nombre,
.dashboard-tarea-titulo,
.pomodoro-stats h3,
.backup-section h3,
.kanban-header h3,
.stack-group h3,
.timer-display,
.timer-mode,
.config-item label {
    color: var(--ld-text, #f7f7ff);
}

.dashboard-proyecto-stats,
.dashboard-tarea-info,
.pomodoro-stats p,
.backup-section p,
.kanban-task-description,
.historial-item,
.backup-item,
.pomodoro-stat-item,
.config-item {
    color: var(--ld-muted, #a3a3c2);
}

.progress-bar,
.pomodoro-progress,
.backup-progress {
    background: rgba(255, 255, 255, 0.08);
}

.timer-bg {
    stroke: rgba(255, 255, 255, 0.08);
}

.timer-progress {
    stroke: #4b8cff;
}

.btn-pause {
    background: rgba(245, 158, 11, 0.16);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.32);
}

.btn-reset {
    background: rgba(255, 255, 255, 0.055);
    color: var(--ld-text, #f7f7ff);
    border: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
}

.btn-complete {
    background: rgba(52, 211, 153, 0.16);
    color: #86efac;
    border: 1px solid rgba(52, 211, 153, 0.32);
}

.btn-pause:hover,
.btn-reset:hover,
.btn-complete:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.progress-fill,
.pomodoro-progress-fill,
.backup-progress-fill {
    background: var(--ld-gradient, linear-gradient(135deg, #4b8cff, #a368ff));
}

.dashboard-project-progress {
    background: var(--dashboard-project-color, var(--ui-primary, #355cff));
}

.heatmap-day.level-0 {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ld-muted, #a3a3c2);
}

.heatmap-day.level-1 {
    background: rgba(75, 140, 255, 0.18);
    color: #9cc5ff;
}

.heatmap-day.level-2 {
    background: rgba(75, 140, 255, 0.32);
    color: #cfe2ff;
}

.heatmap-day.level-3 {
    background: rgba(163, 104, 255, 0.38);
    color: #eadcff;
}

.heatmap-day.level-4 {
    background: linear-gradient(135deg, #4b8cff, #a368ff);
    color: #ffffff;
}

/* ============== DASHBOARD UX REFRESH ============== */
#dashboard {
    display: grid;
    gap: 18px;
}

#dashboard .section-header {
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 0;
}

#dashboard .section-header h2 {
    display: grid;
    gap: 4px;
    margin: 0;
    font-size: 1.42rem;
}

#dashboard .section-header h2::after {
    content: "Resumen operativo de tareas, foco y actividad reciente";
    color: var(--ld-muted, #a3a3c2);
    font-size: 0.86rem;
    font-weight: 500;
}

.dashboard-filters {
    align-items: center;
    gap: 8px;
}

.dashboard-filters select,
.dashboard-filters button {
    min-height: 38px;
}

.dashboard-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 0;
}

.metric-card {
    position: relative;
    min-height: 118px;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    border-radius: 12px;
    background:
        radial-gradient(circle at top right, rgba(75, 140, 255, 0.18), transparent 38%),
        rgba(255, 255, 255, 0.045);
    box-shadow: none;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: var(--ld-border-strong, rgba(75, 140, 255, 0.52));
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto 16px 14px 16px;
    height: 2px;
    border-radius: 999px;
    background: var(--ld-gradient, linear-gradient(135deg, #4b8cff, #a368ff));
    opacity: 0.72;
}

.metric-icon {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 1.25rem;
}

.metric-content {
    min-width: 0;
}

.metric-value {
    margin: 0 0 4px;
    color: var(--ld-text, #f7f7ff);
    font-size: 2rem;
    line-height: 1;
}

.metric-label {
    color: var(--ld-muted, #a3a3c2);
    font-size: 0.82rem;
    line-height: 1.35;
    opacity: 1;
}

.dashboard-charts {
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
    gap: 14px;
    margin-bottom: 0;
}

.chart-container,
.dashboard-section {
    margin-bottom: 0;
    padding: 18px;
    border: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    border-radius: 12px;
    box-shadow: none;
}

.chart-container h3,
.dashboard-section h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 30px;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    color: var(--ld-text, #f7f7ff);
    font-size: 1rem;
    letter-spacing: 0;
}

.chart-container canvas {
    max-height: 260px;
}

.heatmap-container {
    grid-template-columns: repeat(14, minmax(24px, 1fr));
    gap: 6px;
    padding: 0;
}

.heatmap-day {
    min-height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    font-size: 0.72rem;
}

.heatmap-day:hover {
    transform: translateY(-2px);
}

.dashboard-proyectos {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.dashboard-proyecto-item,
.dashboard-tarea-item {
    padding: 14px;
    border-radius: 10px;
}

.dashboard-proyecto-progreso {
    gap: 8px;
}

.dashboard-tareas-urgentes {
    gap: 8px;
}

.dashboard-tarea-prioridad {
    width: 6px;
    height: 42px;
}

.dashboard-tarea-fecha {
    color: var(--ld-muted, #a3a3c2);
}

@media (max-width: 1180px) {
    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    #dashboard .section-header {
        align-items: stretch;
    }

    .dashboard-filters {
        display: grid;
        grid-template-columns: 1fr;
    }

    .dashboard-metrics {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 104px;
    }

    .heatmap-container {
        grid-template-columns: repeat(7, minmax(28px, 1fr));
    }
}

/* ============== KANBAN UX REFRESH ============== */
.view-toggle {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
}

.view-btn {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--ld-muted, #a3a3c2);
    font-weight: 760;
    letter-spacing: 0;
}

.view-btn:hover {
    transform: none;
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.055);
    color: var(--ld-text, #f7f7ff);
}

.view-btn.active {
    border-color: rgba(75, 140, 255, 0.44);
    background:
        linear-gradient(135deg, rgba(75, 140, 255, 0.28), rgba(163, 104, 255, 0.18)),
        rgba(255, 255, 255, 0.055);
    color: #ffffff;
    box-shadow: none;
}

.kanban-board {
    gap: 12px;
    align-items: stretch;
    margin-top: 16px;
}

.kanban-column {
    min-height: min(620px, calc(100vh - 240px));
    padding: 12px;
    border: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.022)),
        rgba(5, 5, 24, 0.64);
}

.kanban-header {
    position: sticky;
    top: 54px;
    z-index: 2;
    margin-bottom: 12px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    background: linear-gradient(180deg, rgba(9, 9, 26, 0.96), rgba(9, 9, 26, 0.80));
}

.kanban-header h3 {
    color: var(--ld-text, #f7f7ff);
    font-size: 0.96rem;
    font-weight: 850;
    letter-spacing: 0;
}

.kanban-count {
    min-width: 28px;
    min-height: 26px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--ld-text, #f7f7ff);
    font-size: 0.78rem;
}

.kanban-tasks {
    gap: 10px;
    min-height: 220px;
    padding: 2px;
}

.kanban-tasks.drag-over {
    border: 1px dashed rgba(75, 140, 255, 0.62);
    border-radius: 10px;
    background: rgba(75, 140, 255, 0.10);
}

.kanban-empty-state {
    display: grid;
    min-height: 98px;
    place-items: center;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    color: var(--ld-muted, #a3a3c2);
    font-size: 0.9rem;
    font-style: normal;
}

.kanban-task {
    padding: 12px;
    border: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    border-left-width: 3px;
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.032)),
        rgba(9, 9, 26, 0.82);
    color: var(--ld-text, #f7f7ff);
    box-shadow: none;
    cursor: grab;
}

.kanban-task:hover {
    transform: translateY(-1px);
    border-color: var(--ld-border-strong, rgba(75, 140, 255, 0.52));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.kanban-task:active {
    cursor: grabbing;
}

.kanban-task.dragging {
    opacity: 0.62;
    transform: scale(0.98);
}

.kanban-task.prioridad-alta {
    border-left-color: rgba(248, 113, 113, 0.86);
}

.kanban-task.prioridad-media {
    border-left-color: rgba(245, 158, 11, 0.86);
}

.kanban-task.prioridad-baja {
    border-left-color: rgba(52, 211, 153, 0.76);
}

.kanban-task-title {
    color: var(--ld-text, #f7f7ff);
    font-size: 0.95rem;
    font-weight: 820;
    line-height: 1.28;
}

.kanban-task-description {
    color: var(--ld-muted, #a3a3c2);
    font-size: 0.86rem;
    line-height: 1.48;
}

.kanban-task-meta {
    align-items: flex-start;
    gap: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--ld-muted, #a3a3c2);
}

.kanban-task-fecha {
    flex-wrap: wrap;
    line-height: 1.4;
}

.kanban-task-project {
    margin-left: 0;
    color: #bfdbfe;
}

.kanban-task-actions {
    gap: 6px;
    margin-top: 10px;
}

.kanban-task-actions button {
    min-width: 31px;
    min-height: 31px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--ld-text, #f7f7ff);
}

.kanban-task-actions button:hover {
    border-color: rgba(75, 140, 255, 0.42);
    background: rgba(75, 140, 255, 0.14);
}

@media (max-width: 980px) {
    .kanban-board {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
        overflow-x: auto;
        padding-bottom: 10px;
        scroll-snap-type: x proximity;
    }

    .kanban-column {
        min-height: 540px;
        scroll-snap-align: start;
    }
}

@media (max-width: 720px) {
    .view-toggle {
        width: 100%;
    }

    .view-btn {
        flex: 1 1 0;
    }

    .kanban-board {
        grid-auto-flow: column;
        grid-auto-columns: minmax(272px, 86vw);
        grid-template-columns: none;
    }

    .kanban-column {
        min-height: 500px;
    }
}

/* ============== DASHBOARD FINAL SURFACE CLEANUP ============== */
#dashboard .chart-container,
#dashboard .dashboard-section {
    border: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.028)),
        rgba(9, 9, 26, 0.78);
    color: var(--ld-text, #f7f7ff);
    box-shadow: none;
}

#dashboard .chart-container h3,
#dashboard .dashboard-section h3 {
    margin: 0 0 14px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    background: transparent;
    color: var(--ld-text, #f7f7ff);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.25;
    letter-spacing: 0;
}

#dashboard .chart-container h3 *,
#dashboard .dashboard-section h3 * {
    color: inherit;
}

/* ============== BACKUP FINAL SURFACE CLEANUP ============== */
#backup .backup-section,
#backup .backup-stats,
#backup .storage-info,
#backup #listaBackups,
#backup .backup-list-item {
    border-color: var(--ld-border, rgba(148, 163, 184, 0.22));
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.028)),
        rgba(9, 9, 26, 0.78);
    color: var(--ld-text, #f7f7ff);
    box-shadow: none;
}

#backup .backup-section {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    border-radius: 12px;
}

#backup .backup-section h3 {
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    background: transparent;
    color: var(--ld-text, #f7f7ff);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.25;
}

#backup .backup-section p,
#backup .help-text,
#backup #storageText,
#backup .backup-list-meta,
#backup .stat-label {
    background: transparent;
    color: var(--ld-muted, #a3a3c2);
}

#backup .backup-actions {
    gap: 8px;
    margin-bottom: 0;
}

#backup .btn-export,
#backup .btn-import {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid rgba(75, 140, 255, 0.44);
    border-radius: 10px;
    background: rgba(75, 140, 255, 0.14);
    color: var(--ld-text, #f7f7ff);
    box-shadow: none;
}

#backup .btn-export:hover,
#backup .btn-import:hover {
    transform: translateY(-1px);
    border-color: rgba(75, 140, 255, 0.62);
    background: rgba(75, 140, 255, 0.20);
    box-shadow: 0 12px 26px rgba(75, 140, 255, 0.18);
}

#backup .backup-stats {
    gap: 10px;
    margin-bottom: 0;
    padding: 0;
    background: transparent;
}

#backup .stat-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.045);
}

#backup .stat-value,
#backup .backup-list-title {
    color: var(--ld-text, #f7f7ff);
}

#backup .storage-bar {
    height: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
}

#backup .storage-used {
    background: linear-gradient(135deg, #4b8cff, #34d399);
}
.execution-queue {
    display: grid;
    gap: 8px;
}

.dashboard-control-header {
    align-items: flex-start;
    gap: 1rem;
}

.dashboard-control-header h3 {
    margin-bottom: .25rem;
}

.dashboard-control-header p {
    margin: 0;
    max-width: 38rem;
}

.dashboard-control-actions {
    display: flex;
    align-items: flex-end;
    gap: .65rem;
    flex-wrap: wrap;
}

.dashboard-control-filter {
    display: grid;
    gap: .25rem;
    color: var(--text-muted, #a8abc2);
    font-size: .75rem;
}

.dashboard-control-filter select {
    min-width: 12rem;
}

.dashboard-control-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.dashboard-control-stat {
    min-height: 5.25rem;
    padding: .9rem 1rem;
    border: 1px solid var(--border-color, #33364e);
    border-radius: 8px;
    background: var(--surface-elevated, rgba(255,255,255,.035));
}

.dashboard-control-stat strong,
.dashboard-control-stat span {
    display: block;
}

.dashboard-control-stat strong {
    margin-top: .35rem;
    font-size: 1.55rem;
}

.dashboard-control-stat span {
    color: var(--text-muted, #a8abc2);
    font-size: .78rem;
}

@media (max-width: 700px) {
    .dashboard-control-header {
        display: block;
    }

    .dashboard-control-actions {
        margin-top: .8rem;
        align-items: stretch;
    }

    .dashboard-control-filter,
    .dashboard-control-filter select,
    .dashboard-control-actions button {
        width: 100%;
    }

    .dashboard-control-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.execution-queue-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.045);
}

.execution-queue-row strong,
.execution-queue-row small {
    display: block;
}

.execution-queue-row small {
    margin-top: 4px;
    color: var(--ld-muted, #a3a3c2);
}

.btn-queue-start {
    padding: 8px 12px;
}

.agent-presence-list {
    display: grid;
    gap: 8px;
}

.agent-presence-row {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--ld-border, rgba(148, 163, 184, 0.22));
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.045);
}

.agent-presence-row strong,
.agent-presence-row small {
    display: block;
}

.agent-presence-row small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--ld-muted, #a3a3c2);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-presence-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
}

.agent-presence-dot.activo { background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12); }
.agent-presence-dot.offline { background: #f87171; }
.agent-presence-status { color: var(--ld-muted, #a3a3c2); font-size: 0.75rem; white-space: nowrap; }
.agent-presence-status.activo { color: #bbf7d0; }
.agent-presence-status.offline { color: #fca5a5; }

.approval-queue-row {
    grid-template-columns: minmax(0, 1fr) auto;
    border-color: rgba(251, 191, 36, 0.38);
    background: rgba(120, 76, 10, 0.12);
}

.approval-queue-task {
    min-width: 0;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.approval-queue-task:hover strong {
    color: #fde68a;
}

.approval-queue-task strong,
.approval-queue-task small {
    display: block;
}

.approval-queue-task small {
    margin-top: 4px;
    color: var(--ld-muted, #a3a3c2);
}

.approval-queue-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.approval-queue-actions button {
    padding: 8px 12px;
}

.btn-queue-approve {
    background: #168c68;
}

@media (max-width: 640px) {
    .approval-queue-row {
        grid-template-columns: 1fr;
    }

    .approval-queue-actions {
        justify-content: stretch;
    }

    .approval-queue-actions button {
        flex: 1;
    }
}

@media (max-width: 640px) {
    .execution-queue-row {
        grid-template-columns: 1fr auto;
    }

    .execution-queue-row .btn-queue-start {
        grid-column: 1 / -1;
        width: 100%;
    }

    .agent-presence-row {
        grid-template-columns: 9px minmax(0, 1fr);
    }

    .agent-presence-status {
        grid-column: 2;
    }
}
.dashboard-health-summary {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--dashboard-muted, rgba(226, 232, 240, 0.72));
    font-size: 0.75rem;
}

.health-summary-item {
    padding: 4px 7px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.035);
}

.health-summary-item.estable { color: #bbf7d0; }
.health-summary-item.atencion { color: #fde68a; }
.health-summary-item.critico { color: #fecaca; }
.health-summary-item.riesgos { color: #cbd5e1; }
.health-summary-item { cursor: pointer; font: inherit; }
.health-summary-item:hover, .health-summary-item.activo { border-color: rgba(165,180,252,.7); background: rgba(129,140,248,.14); }
.dashboard-health-row { width: 100%; border: 0; cursor: pointer; text-align: left; }
.dashboard-health-row:hover { border-color: rgba(165,180,252,.55); background: rgba(129,140,248,.08); }
