* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
}


.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.header-left .logo-link {
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.header-left .logo-link:hover {
    opacity: 0.8;
}

.header-left .logo {
    color: #6366f1;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0;
}

.header-center .greeting {
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.user-menu:hover {
    background: #f1f5f9;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #6366f1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.user-name {
    font-size: 15px;
    font-weight: 500;
    color: #374151;
}

.dropdown-icon {
    font-size: 12px;
    color: #64748b;
}


.user-menu {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    color: #1e293b;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    margin: 4px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

a {
    text-decoration: none;
}


.dropdown-item:hover {
    background-color: #f1f5f9;
}

.dropdown-item.logout:hover {
    color: #dc2626;
}

.dropdown-icon-item {
    font-size: 16px;
}

.dropdown-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 8px 0;
}


.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
}


.welcome-section {
    text-align: center;
    margin-bottom: 48px;
}

.welcome-title {
    font-size: 42px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.welcome-subtitle {
    font-size: 18px;
    color: #64748b;
    font-weight: 400;
}


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

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px 0 rgba(0, 0, 0, 0.1);
}

.stat-card.por-hacer {
    border-top: 4px solid #f59e0b;
}

.stat-card.por-hacer .stat-icon {
    background: #fef3c7;
}

.stat-card.en-progreso {
    border-top: 4px solid #3b82f6;
}

.stat-card.en-progreso .stat-icon {
    background: #dbeafe;
}

.stat-card.completadas {
    border-top: 4px solid #10b981;
}

.stat-card.completadas .stat-icon {
    background: #d1fae5;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 16px;
    color: #64748b;
    font-weight: 500;
}


.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.action-card {
    background: white;
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.action-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px 0 rgba(0, 0, 0, 0.12);
}

.action-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 24px;
}

.action-icon.ver-tareas {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.action-icon.nueva-tarea {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.action-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.action-description {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 28px;
    line-height: 1.6;
}

.action-button {
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 200px;
    display: block;
    margin: 0 auto;
}

.action-button.primary {
    background: #6366f1;
    color: white;
}

.action-button.primary:hover {
    background: #5856eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.action-button.secondary {
    background: #10b981;
    color: white;
}

.action-button.secondary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}


.quick-add-section {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.quick-add-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.quick-add-icon {
    font-size: 24px;
}

.quick-add-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.quick-add-form {
    display: flex;
    gap: 16px;
    align-items: center;
}

.quick-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    color: #374151;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.quick-input:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.quick-add-btn {
    padding: 16px 24px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-add-btn:hover {
    background: #5856eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}


@media (max-width: 768px) {
    .main-content {
        padding: 32px 16px;
    }

    .header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-center {
        order: 3;
        width: 100%;
        text-align: center;
    }

    .welcome-title {
        font-size: 32px;
    }

    .welcome-subtitle {
        font-size: 16px;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .action-cards {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .action-card {
        padding: 32px 24px;
    }

    .quick-add-form {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-add-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 24px 16px;
    }

    .stat-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .stat-number {
        font-size: 36px;
    }

    .action-icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }

    .action-title {
        font-size: 20px;
    }

    .action-description {
        font-size: 14px;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-box {
    background: white;
    padding: 24px;
    border-radius: 12px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease;
}

.modal-box p {
    font-size: 16px;
    margin-bottom: 16px;
}

.modal-box.success p {
    color: #065f46;
}

.modal-box.error p {
    color: #000000;
}

.modal-box.success button {
    background: #6366f1;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.modal-box.error button {
    background: #c20000;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.modal-box.success button:hover {
    background: #5856eb;
}

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

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

.modal-box.error button:hover {
    background: #940000;
}

/* Estilos para modales de tipo warning con botones diferenciados */
.modal-box.warning .modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-box.warning button:first-child {
    background: #ef4444; /* Rojo para acción destructiva */
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.modal-box.warning button:last-child {
    background: white; /* Blanco para cancelar */
    color: #374151;
    border: 1px solid #d1d5db; /* Borde gris */
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.modal-box.warning button:first-child:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.modal-box.warning button:last-child:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

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


.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}