:root {
    --electric-blue: #3B82F6;
    --energetic-coral: #FF6B6B;
    --soft-mint-green: #10B981;
    --smoke-white: #F8FAFC;
    --dark-background: #0f172a;
    --dark-surface: #1e293b;
    --dark-text: #F8FAFC;
    --light-text: #1f2937; /* Un negro más suave */
    --border-color-light: #e2e8f0;
    --border-color-dark: #334155;
    --input-bg-light: #f1f5f9;
    --input-bg-dark: #334155;
    --hero-bg-light: #f1f5f9; /* Fondo para la sección hero */
    --hero-bg-dark: #0f172a;

    --background-color: var(--smoke-white);
    --text-color: var(--light-text);
    --primary-color: var(--electric-blue);
    --surface-color: #fff;
    --border-color: var(--border-color-light);
    --hover-color: #f1f5f9;
    --icon-color: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --navbar-bg: rgba(255, 255, 255, 0.9);
    --input-bg: var(--input-bg-light);
    --hero-bg: var(--hero-bg-light);

    /* Priority Colors */
    --priority-high-bg: #fee2e2;
    --priority-high-text: #ef4444;
    --priority-medium-bg: #ffedd5;
    --priority-medium-text: #f97316;
    --priority-low-bg: #dbeafe;
    --priority-low-text: #3b82f6;
}

html.dark-mode {
    --background-color: var(--dark-background);
    --text-color: var(--dark-text);
    --surface-color: var(--dark-surface);
    --border-color: var(--border-color-dark);
    --hover-color: #334155;
    --icon-color: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --navbar-bg: rgba(30, 41, 59, 0.9);
    --input-bg: var(--input-bg-dark);
    --hero-bg: var(--hero-bg-dark);

    /* Priority Colors Dark Mode */
    --priority-high-bg: #7f1d1d;
    --priority-high-text: #fca5a5;
    --priority-medium-bg: #7c2d12;
    --priority-medium-text: #fdba74;
    --priority-low-bg: #1e3a8a;
    --priority-low-text: #93c5fd;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar Isla */
.navbar-island {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    width: auto;
    min-width: 400px;
    max-width: 90%;
    border: 1px solid var(--glass-border);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    text-decoration: none;
    margin-right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-logo {
    height: 28px;
    width: auto;
}

.navbar-links {
    display: flex;
    gap: 5px;
    margin-right: auto;
    margin-left: 20px;
    align-items: center; /* Alinea los enlaces verticalmente */
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: inline-flex; /* Asegura un comportamiento de caja predecible */
    align-items: center; /* Centra el texto verticalmente */
    height: 100%;
}

.nav-link:hover {
    background-color: var(--hover-color);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.navbar-user {
    font-size: 0.9rem;
    margin-right: 15px;
    opacity: 0.8;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.navbar-island form {
    display: flex;
    align-items: center;
    margin: 0;
    height: 100%;
    margin-left: 25px; /* Aumentado de 15px a 25px para distanciar más */
}

.navbar-logout {
    color: var(--energetic-coral);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    height: 100%; /* Toma la altura del contenedor para alinear */
}

.navbar-logout:hover {
    opacity: 0.7;
}

/* Layout Dashboard */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    margin-top: 100px;
}

/* Estilos específicos para la Landing/Login */
.landing-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: var(--background-color);
}

.landing-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1000px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-section {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Centra horizontalmente */
    text-align: center; /* Centra el texto */
    min-width: 300px;
    background-color: var(--hero-bg);
}

.hero-logo {
    max-width: 120px; /* Logo más grande */
    margin-bottom: 30px;
}

.hero-section h1 {
    font-size: 4rem; /* Título más grande */
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--primary-color);
    line-height: 1.1;
    letter-spacing: -2px;
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.7;
    margin-bottom: 20px;
    max-width: 350px;
}

.login-section {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--surface-color);
    min-width: 300px;
}

/* Estilos de Inputs y Botones (Modernizados) */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.form-control, .select-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-control:focus, .select-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: var(--surface-color);
}

.form-control::placeholder {
    color: var(--text-color);
    opacity: 0.5;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    background-color: #2563eb; /* Un tono más oscuro de azul */
}

.btn-secondary {
    background-color: var(--energetic-coral);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    top: 28px;
    right: 20px;
    z-index: 1001;
}

/* ... (resto de estilos de dashboard, etc. que no necesitan cambios) ... */
.dashboard-header { margin-bottom: 30px; }
.dashboard-header h1 { font-size: 2rem; margin: 0; color: var(--text-color); }
.dashboard-header p { margin: 5px 0 0; opacity: 0.6; font-size: 0.95rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: var(--surface-color); padding: 20px; border-radius: 16px; border: 1px solid var(--border-color); box-shadow: 0 2px 4px rgba(0,0,0,0.02); display: flex; flex-direction: column; }
.stat-title { font-size: 0.85rem; color: var(--text-color); opacity: 0.7; margin-bottom: 10px; font-weight: 600; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--text-color); }
.stat-icon { align-self: flex-end; margin-top: -30px; color: var(--primary-color); opacity: 0.2; }
.main-grid { display: grid; grid-template-columns: 3fr 1fr; gap: 30px; }
@media (max-width: 900px) { .main-grid { grid-template-columns: 1fr; } }
.task-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.task-card { background: var(--surface-color); border-radius: 12px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; transition: transform 0.2s, box-shadow 0.2s; }
.task-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.task-info { display: flex; align-items: center; gap: 15px; flex: 1; }
.task-check { width: 24px; height: 24px; border: 2px solid var(--border-color-dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; color: transparent; }
.task-check.completed { background-color: var(--soft-mint-green); border-color: var(--soft-mint-green); color: white; }
.task-details h3 { margin: 0; font-size: 1rem; font-weight: 600; color: var(--text-color); }
.task-meta { display: flex; gap: 10px; margin-top: 5px; font-size: 0.8rem; color: var(--text-color); opacity: 0.7; }
.badge { padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.badge-high { background-color: var(--priority-high-bg); color: var(--priority-high-text); }
.badge-medium { background-color: var(--priority-medium-bg); color: var(--priority-medium-text); }
.badge-low { background-color: var(--priority-low-bg); color: var(--priority-low-text); }
.task-actions { display: flex; gap: 8px; opacity: 0; transition: opacity 0.2s; }
.task-card:hover .task-actions { opacity: 1; }
.sidebar-section { background: var(--surface-color); border-radius: 16px; padding: 20px; border: 1px solid var(--border-color); }
.sidebar-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; color: var(--text-color); }
.user-list { list-style: none; padding: 0; margin: 0; }
.user-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.user-item:last-child { border-bottom: none; }
.user-avatar { width: 40px; height: 40px; background-color: var(--hover-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary-color); font-size: 1.1rem; }
.user-info h4 { margin: 0; font-size: 0.95rem; color: var(--text-color); }
.user-status { font-size: 0.8rem; color: var(--soft-mint-green); }
.add-task-wrapper { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 12px; padding: 15px; margin-bottom: 20px; }
.add-task-row { display: flex; gap: 10px; align-items: center; }
.add-task-options { display: flex; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-color); }
.theme-switch { display: inline-block; height: 34px; position: relative; width: 60px; }
.theme-switch input { display:none; }
.slider { background-color: #ccc; bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0; transition: .4s; border-radius: 34px; }
.slider:before { background-color: #fff; bottom: 4px; content: ""; height: 26px; left: 4px; position: absolute; transition: .4s; width: 26px; z-index: 1; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(26px); }
.icon { position: absolute; top: 50%; transform: translateY(-50%); transition: opacity 0.4s; z-index: 2; pointer-events: none; }
.icon svg { width: 20px; height: 20px; stroke: var(--icon-color); }
.sun { left: 7px; opacity: 1; }
.moon { right: 7px; opacity: 0; }
input:checked + .slider .sun { opacity: 0; }
input:checked + .slider .moon { opacity: 1; }
.action-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; color: var(--icon-color); transition: all 0.2s; text-decoration: none; }
.action-btn:hover { background-color: var(--hover-color); color: var(--text-color); }
.delete-btn:hover { color: var(--energetic-coral); background-color: rgba(255, 107, 107, 0.1); }
