/* =========================
   VARIABLES GLOBALES
========================= */
:root {
    --bg-gradient: radial-gradient(circle at 20% 20%, #667eea, #764ba2, #ff6ec7);
    --bg-gradient-dark: radial-gradient(circle at 20% 20%, #0f172a, #020617, #4b0082);
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-bg-dark: rgba(30, 41, 59, 0.9);
    --text-color: #1e293b;
    --text-color-dark: #f1f5f9;
    --accent: #667eea;
    --accent-gradient: linear-gradient(135deg, #667eea, #764ba2, #ff6ec7);
    --button-radius: 12px;
    --transition-speed: 0.3s;
}

/* =========================
   BODY MODO CLARO / OSCURO
========================= */
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    transition: background var(--transition-speed), color var(--transition-speed);
}

body.dark {
    background: var(--bg-gradient-dark);
    color: var(--text-color-dark);
}

/* =========================
   HEADER Y TITULO ORBITASK
========================= */
header {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    text-align: center;
    z-index: 1;
}

/* Logo OrbiTask + cohete */
.logo {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px; 
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffffff, #e0e0e0, #c0c0c0); /* degradé plateado más claro */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow:
        1px 1px 1px rgba(0,0,0,0.2); /* delineado muy sutil */
}

/* Subtítulo / lema */
.subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff, #e0e0e0, #c0c0c0); /* mismo degradé que logo */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2); /* delineado muy sutil */
    margin-top: 0;
}


/* =========================
   SWITCH DIA/NOCHE
========================= */
.theme-switch-container {
    position: absolute;
    top: 20px;
    right: 20px;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.theme-switch input {
    display: none;
}

.theme-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #667eea, #764ba2, #a855f7);
    border-radius: 30px;
    transition: 0.4s;
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.theme-switch .slider:before {
    position: absolute;
    content: "";
    height: 24px; width: 24px;
    left: 3px; bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.4s;
    box-shadow: 0 0 3px rgba(0,0,0,0.5);
}

.theme-switch input:checked + .slider {
    background: linear-gradient(135deg, #ff6a00, #ee0979, #ff6ec7);
}

.theme-switch input:checked + .slider:before {
    transform: translateX(30px);
}

/* =========================
   CONTENEDOR PRINCIPAL
========================= */
.container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

/* =========================
   CARD
========================= */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    transition: background var(--transition-speed);
}

body.dark .card {
    background: var(--card-bg-dark);
}

/* =========================
   FORMULARIO
========================= */
.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.input-group input,
.input-group select {
    flex: 1 1 auto;
    padding: 10px;
    border-radius: var(--button-radius);
    border: none;
}

.input-group button {
    padding: 10px 20px;
    border-radius: var(--button-radius);
    border: none;
    background: var(--accent-gradient);
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.input-group button:hover {
    opacity: 0.9;
}

/* =========================
   FILTROS Y BUSQUEDA
========================= */
.filters-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-buttons, .chart-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* =========================
   FILTROS Y DISTRIBUCION TAREAS
========================= */

/* Botones de filtros normales */
.filter-btn, .chart-filter {
    padding: 8px 12px;
    border-radius: var(--button-radius);
    border: none;
    background: rgba(0,0,0,0.05);
    cursor: pointer;
    transition: 0.3s;
    color: #000; /* texto por defecto en modo claro */
}

/* Botones activos */
.filter-btn.active, .chart-filter.active {
    background: var(--accent-gradient);
    color: #fff;
}

/* Ajuste para modo oscuro */
body.dark .filter-btn,
body.dark .chart-filter {
    color: #f1f5f9; /* texto visible en modo oscuro */
    background: rgba(255,255,255,0.05); /* fondo ligero en modo oscuro */
}

body.dark .filter-btn.active,
body.dark .chart-filter.active {
    background: linear-gradient(135deg, #ff6a00, #ee0979); /* gradiente galaxia modo oscuro */
    color: #fff; /* texto blanco para visibilidad */
}


/* =========================
   LISTA TAREAS
========================= */
.tasks-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tasks-container li {
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
}

.tasks-container li.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.tasks-container .task-actions button {
    margin-left: 5px;
    padding: 6px 10px;
    border-radius: var(--button-radius);
    border: none;
    cursor: pointer;
    background: var(--accent-gradient);
    color: #fff;
    transition: 0.3s;
}

.tasks-container .task-actions button:hover {
    opacity: 0.9;
}

.empty-state {
    text-align: center;
    padding: 30px 0;
    color: rgba(0,0,0,0.4);
}
/* Empty state modo oscuro */
body.dark .empty-state {
    color: rgba(255, 255, 255, 0.6); /* modo oscuro */
}
/* =========================
   ESTADISTICAS
========================= */
.stats-grid {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-box {
    background: rgba(0,0,0,0.05);
    flex: 1;
    margin: 0 5px;
    padding: 15px;
    border-radius: var(--button-radius);
    text-align: center;
}

.progress-section {
    margin-bottom: 20px;
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background: rgba(0,0,0,0.1);
    border-radius: var(--button-radius);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: var(--button-radius);
    transition: width 0.4s ease;
}

/* =========================
   CHART
========================= */
.chart-section {
    margin-top: 20px;
}

.chart-section canvas {
    width: 100% !important;
    height: 250px !important;
}

/* =========================
   RESPONSIVE
========================= */
@media(max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }

    header {
        padding: 15px;
    }

    .theme-switch-container {
        top: 15px;
        right: 15px;
    }
}
/* =========================
   FOOTER
========================= */
.footer {
    text-align: center;
    padding: 15px 20px;
    font-size: 0.9rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    position: relative;
    bottom: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(102,126,234,0.15), rgba(118,75,162,0.15), rgba(255,110,199,0.15));
    color: var(--text-color);
    transition: background var(--transition-speed), color var(--transition-speed), border-top var(--transition-speed);
}

body.dark .footer {
    background: linear-gradient(135deg, rgba(15,23,42,0.4), rgba(2,6,23,0.4), rgba(75,0,130,0.4));
    color: var(--text-color-dark);
    border-top: 1px solid rgba(255,255,255,0.2);
}

